Skip to content

Commit 52bc317

Browse files
rchen152meta-codesync[bot]
authored andcommitted
Update from upstream
Summary: Pulls in updates from python/typing#2095: some test changes that improve our conformance a bit, plus a pyrefly.toml file so that pyrefly can't pick up a stray config file and do interesting things. Reviewed By: yangdanny97 Differential Revision: D84370023 fbshipit-source-id: 0e8d70a00db73469b6e13812f8cf5920090b0e73
1 parent d8bd2b8 commit 52bc317

13 files changed

+126
-149
lines changed

conformance/third_party/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)