includes new fix for formatting like black does.
also runs black on a few outliers.
Change-Id: I67446660a6bc10b73eb710389ae6d3f122af9302
(cherry picked from commit
2579ed2b8f295c7e0ad3d875bf57535623f8df0d)
- id: black
- repo: https://github.com/sqlalchemyorg/zimports
- rev: v0.4.0
+ rev: v0.5.0
hooks:
- id: zimports
- args:
- - --keep-unused-type-checking
- repo: https://github.com/pycqa/flake8
rev: 3.9.2
"""Produce an engine configured by --options with optional overrides."""
if asyncio:
- from sqlalchemy.ext.asyncio import create_async_engine as create_engine
+ from sqlalchemy.ext.asyncio import (
+ create_async_engine as create_engine,
+ )
elif future or (
config.db and config.db._is_future and future is not False
):
[tool.black]
line-length = 79
target-version = ['py27', 'py36']
+
+[tool.zimports]
+black-line-length = 79
+keep-unused-type-checking = true
+
+
from sqlalchemy import Column
from sqlalchemy import Enum
-from sqlalchemy.orm import declarative_base, Mapped
+from sqlalchemy.orm import declarative_base
+from sqlalchemy.orm import Mapped
from . import enum_col_import1
-from .enum_col_import1 import IntEnum, StrEnum
+from .enum_col_import1 import IntEnum
+from .enum_col_import1 import StrEnum
Base = declarative_base()