From 92985c0e8f1019c256dac28962f0fe8e8d1d3a6c Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 24 Feb 2026 11:03:24 -0500 Subject: [PATCH] fix an idiosyncratic F821 failure 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 | 6 ++++-- test/orm/declarative/test_typed_mapping.py | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/test/orm/declarative/test_tm_future_annotations_sync.py b/test/orm/declarative/test_tm_future_annotations_sync.py index 04d98b20a7..0c4647d818 100644 --- a/test/orm/declarative/test_tm_future_annotations_sync.py +++ b/test/orm/declarative/test_tm_future_annotations_sync.py @@ -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): diff --git a/test/orm/declarative/test_typed_mapping.py b/test/orm/declarative/test_typed_mapping.py index 3daf8e4e9b..dbd208ca79 100644 --- a/test/orm/declarative/test_typed_mapping.py +++ b/test/orm/declarative/test_typed_mapping.py @@ -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): -- 2.47.3