Skip to content

Commit 0197415

Browse files
authored
Fix tests to reflect the current state (#526)
1 parent 38292a4 commit 0197415

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tests/forward_refs_annassign.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class Child(Parent): ...
5050

5151
class MyClass:
5252
foo: int
53-
bar = foo
53+
bar = foo # F821 undefined name 'foo'
5454

5555
baz: MyClass
56-
eggs = baz
56+
eggs = baz # F821 undefined name 'baz'

tests/vanilla_flake8_not_clean_forward_refs.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ from typing import TypeAlias, Union
33

44
ManyStr: TypeAlias = list[EitherStr] # F821 undefined name 'EitherStr'
55
EitherStr: TypeAlias = Union[str, bytes]
6-
def function(accepts: EitherStr) -> None: ...
6+
# The following line reports "F821 undefined name 'EitherStr'" on Python 3.14+
7+
# but not on earlier versions.
8+
# def function(accepts: EitherStr) -> None: ... # F821 undefined name 'EitherStr'
79

810
del EitherStr # private name, not exported

0 commit comments

Comments
 (0)