Skip to content

Commit 89f5f7c

Browse files
authored
Make deferred-annotation errors optional (depends on version) (#2096)
1 parent b3f46cf commit 89f5f7c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

conformance/tests/annotations_forward_refs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ def func1(
1919
assert_type(p4, list[ClassA | int])
2020

2121

22-
bad1: ClassA # E: Runtime error: requires quotes
23-
bad2: list[ClassA] # E: Runtime error: requires quotes
22+
bad1: ClassA # E?: Runtime error prior to 3.14: requires quotes
23+
bad2: list[ClassA] # E?: Runtime error prior to 3.14: requires quotes
2424
bad3: "ClassA" | int # E: Runtime error
2525
bad4: int | "ClassA" # E: Runtime error
2626

@@ -63,7 +63,7 @@ def invalid_annotations(
6363

6464

6565
class ClassB:
66-
def method1(self) -> ClassB: # E: Runtime error
66+
def method1(self) -> ClassB: # E?: Runtime error prior to 3.14
6767
return ClassB()
6868

6969
def method2(self) -> "ClassB": # OK

0 commit comments

Comments
 (0)