Skip to content

Commit e77312d

Browse files
committed
fix some test comments
1 parent a658f41 commit e77312d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

crates/ruff_linter/resources/test/fixtures/pyflakes/F821_18.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ class Bar:
1414
]
1515

1616

17-
# OK: Allow named expressions in annotations.
17+
# This is no longer allowed on Python 3.14+
1818
x: (y := 1)
1919
print(y)

crates/ruff_linter/resources/test/fixtures/pyflakes/F821_26.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@
1313

1414
# References to a class from inside the class:
1515
class C:
16-
other: C = ... # valid in a `.pyi` stub file, not in a `.py` runtime file
16+
other: C = ... # valid in a `.pyi` stub file, and in a `.py` runtime file with deferred annotations
1717
other2: "C" = ... # always okay
18-
def from_str(self, s: str) -> C: ... # valid in a `.pyi` stub file, not in a `.py` runtime file
18+
def from_str(self, s: str) -> C: ... # valid in a `.pyi` stub file, and in a `.py` runtime file with deferred annotations
1919
def from_str2(self, s: str) -> "C": ... # always okay
2020

2121
# Circular references:
2222
class A:
23-
foo: B # valid in a `.pyi` stub file, not in a `.py` runtime file
23+
foo: B # valid in a `.pyi` stub file, and in a `.py` runtime file with deferred annotations
2424
foo2: "B" # always okay
25-
bar: dict[str, B] # valid in a `.pyi` stub file, not in a `.py` runtime file
25+
bar: dict[str, B] # valid in a `.pyi` stub file, and in a `.py` runtime file with deferred annotations
2626
bar2: dict[str, "A"] # always okay
2727

2828
class B:

crates/ruff_linter/src/rules/pyflakes/snapshots/ruff_linter__rules__pyflakes__tests__F821_F821_18.py.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ source: crates/ruff_linter/src/rules/pyflakes/mod.rs
44
F821 Undefined name `y`
55
--> F821_18.py:19:7
66
|
7-
17 | # OK: Allow named expressions in annotations.
7+
17 | # This is no longer allowed on Python 3.14+
88
18 | x: (y := 1)
99
19 | print(y)
1010
| ^

0 commit comments

Comments
 (0)