]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix an idiosyncratic F821 failure
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 24 Feb 2026 16:03:24 +0000 (11:03 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 24 Feb 2026 16:03:24 +0000 (11:03 -0500)
this fail only occurs:

1. with python 3.13 (maybe earlier also?)
2. in the 2.0 branch.   identical code is in main and does not fail
(identical flake8 settings too)

can't narrow down why this one occurs but it's failing
GH actions so just patch it

Change-Id: Ib1655856e0363b9dc365e093a86eecc75e5d783c

test/orm/declarative/test_tm_future_annotations_sync.py
test/orm/declarative/test_typed_mapping.py

index 04d98b20a735df37cc14f9dfc4ebe18677c19df7..0c4647d8186c2d54a2d661e97e9dcd594442a352 100644 (file)
@@ -4590,9 +4590,11 @@ class AllYourFavoriteHitsTest(fixtures.TestBase, testing.AssertsCompiledSQL):
                 BigInteger, Identity(always=True), primary_key=True
             )
 
-            bs: Mapped[list[B]] = relationship(back_populates="a")
+            bs: Mapped[list[B]] = relationship(  # noqa: F821
+                back_populates="a"
+            )
 
-            def __init__(self, bs: list[B], *args, **kwargs):
+            def __init__(self, bs: list[B], *args, **kwargs):  # noqa: F821
                 super().__init__(*args, bs=bs, **kwargs)
 
         class B(decl_base):
index 3daf8e4e9b142056343d9779b59a34d8d38c5ea5..dbd208ca799f467028d6b2a776b38a6a2750f10f 100644 (file)
@@ -4581,9 +4581,11 @@ class AllYourFavoriteHitsTest(fixtures.TestBase, testing.AssertsCompiledSQL):
                 BigInteger, Identity(always=True), primary_key=True
             )
 
-            bs: Mapped[list[B]] = relationship(back_populates="a")
+            bs: Mapped[list[B]] = relationship(  # noqa: F821
+                back_populates="a"
+            )
 
-            def __init__(self, bs: list[B], *args, **kwargs):
+            def __init__(self, bs: list[B], *args, **kwargs):  # noqa: F821
                 super().__init__(*args, bs=bs, **kwargs)
 
         class B(decl_base):