]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
try flake8-import-order 0.19.2
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 24 Jun 2025 17:57:17 +0000 (13:57 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 24 Jun 2025 18:17:29 +0000 (14:17 -0400)
the big new thang is that it is doing import order checks inside of
TYPE_CHECKING blocks.   Introduces some new codes that we
enthusiastically add to our ignore list.   update to the latest
and greatest zimports 0.6.2 as well

Change-Id: I4e844408a8b218f9b92c43ad5e2a5c16781100be
(cherry picked from commit 1c8343576188940268de467b2537e5f838464690)

.pre-commit-config.yaml
doc/build/index.rst
lib/sqlalchemy/sql/compiler.py
setup.cfg
tox.ini

index 06a3ef63661ed70858f071d6d48c0bc8f5de7069..688ff050ef9a489aa71ed38ed2205464357ac38d 100644 (file)
@@ -7,7 +7,7 @@ repos:
     -   id: black
 
 -   repo: https://github.com/sqlalchemyorg/zimports
-    rev: v0.6.0
+    rev: v0.6.2
     hooks:
     -   id: zimports
 
@@ -16,7 +16,7 @@ repos:
     hooks:
     -   id: flake8
         additional_dependencies:
-          - flake8-import-order<0.19
+          - flake8-import-order>=0.19.2
           - flake8-import-single==0.1.5
           - flake8-builtins
           - flake8-future-annotations>=0.0.5
index 44914b0bb5440c7a677fc5d82887d3d33fc8017e..d76189947ad4038ed776b694329494fe5618be5a 100644 (file)
@@ -166,8 +166,12 @@ SQLAlchemy Documentation
 
   .. container::
 
-    * :doc:`Frequently Asked Questions <faq/index>` - A collection of common problems and solutions
-    * :doc:`Glossary <glossary>` - Terms used in SQLAlchemy's documentation
-    * :doc:`Error Message Guide <errors>` - Explanations of many SQLAlchemy Errors
-    * :doc:`Complete table of of contents <contents>`
-    * :ref:`Index <genindex>`
+    * :doc:`Frequently Asked Questions <faq/index>` - A collection of common
+      problems and solutions
+    * :doc:`Glossary <glossary>` - Definitions of terms used in SQLAlchemy
+      documentation
+    * :doc:`Error Message Guide <errors>` - Explanations of many SQLAlchemy
+      errors
+    * :doc:`Complete table of of contents <contents>` - Full list of available
+      documentation
+    * :ref:`Index <genindex>` - Index for easy lookup of documentation topics
index e5a1d16467777836235181ae8e426ef725212c36..580beee7fc7c321a12a2c6788a711b1200a321be 100644 (file)
@@ -2314,10 +2314,7 @@ class SQLCompiler(Compiled):
     @util.memoized_property
     @util.preload_module("sqlalchemy.engine.result")
     def _inserted_primary_key_from_returning_getter(self):
-        if typing.TYPE_CHECKING:
-            from ..engine import result
-        else:
-            result = util.preloaded.engine_result
+        result = util.preloaded.engine_result
 
         assert self.compile_state is not None
         statement = self.compile_state.statement
index de35dd2e1582bc2206d6adf6f3c7502b6016f7b6..eb2cd3605d22128d5397bf29b4247c617991639a 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -108,6 +108,7 @@ ignore =
     A003,A005
     D,
     E203,E305,E701,E704,E711,E712,E721,E722,E741,
+    I300,
     N801,N802,N806,
     RST304,RST303,RST299,RST399,
     W503,W504,W601
diff --git a/tox.ini b/tox.ini
index 54afe1dc11760239a4ae08fda0cc0ecdbe913d7c..da0898ec9c8763cad40a51c535354953eb2a2e25 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -240,7 +240,7 @@ extras=
 
 deps=
       flake8==7.2.0
-      flake8-import-order<0.19
+      flake8-import-order>=0.19.2
       flake8-builtins
       flake8-future-annotations>=0.0.5
       flake8-docstrings>=1.6.0