]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
update zimports
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 9 Feb 2022 20:39:44 +0000 (15:39 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 9 Feb 2022 22:28:14 +0000 (17:28 -0500)
includes new fix for formatting like black does.

also runs black on a few outliers.

Change-Id: I67446660a6bc10b73eb710389ae6d3f122af9302
(cherry picked from commit 2579ed2b8f295c7e0ad3d875bf57535623f8df0d)

.pre-commit-config.yaml
lib/sqlalchemy/testing/engines.py
pyproject.toml
test/ext/mypy/incremental/ticket_6435/enum_col_import2.py

index ae35977b9d0c027262f324fe0113c8e809331959..f8512708ee8078f7b849f01c9a335fa5b6c6ab1b 100644 (file)
@@ -7,11 +7,9 @@ repos:
     -   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
index 97809f4b9c228ee0f57027cb623c76ee8a7008a3..a92d476ac54e978790d2e49d3fb2322217cab097 100644 (file)
@@ -280,7 +280,9 @@ def testing_engine(
     """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
     ):
index 0f72578923ce0bf603f0bca5ba7e00c2ccdaa89e..f82dbd468b328ed0556c4ba17ba6692ef2839a3f 100644 (file)
@@ -1,3 +1,9 @@
 [tool.black]
 line-length = 79
 target-version = ['py27', 'py36']
+
+[tool.zimports]
+black-line-length = 79
+keep-unused-type-checking = true
+
+
index 4f29932e569d3ae34466aad51d405c11f0cbab56..161dce08757bb4d9d790aeb3f73e46e87605076c 100644 (file)
@@ -1,8 +1,10 @@
 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()