From da90abf6cadab38fd2eec2160adf34377d4bba24 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Sun, 4 Aug 2024 12:01:28 +0100 Subject: [PATCH] =?UTF-8?q?Revert=20"Fix=20`RawExpressionType.accept`=20cr?= =?UTF-8?q?ash=20with=20`--cache-fine-grained`=20(#17=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 8b74b5ab03742ba86348dfe14d0468a995f74ee7. --- mypy/types.py | 2 -- test-data/unit/check-typeddict.test | 12 ------------ 2 files changed, 14 deletions(-) diff --git a/mypy/types.py b/mypy/types.py index c29d686ce5d8..52b3121f9fb3 100644 --- a/mypy/types.py +++ b/mypy/types.py @@ -2705,8 +2705,6 @@ def simple_name(self) -> str: return self.base_type_name.replace("builtins.", "") def accept(self, visitor: TypeVisitor[T]) -> T: - if self.node is not None: - return self.node.accept(visitor) assert isinstance(visitor, SyntheticTypeVisitor) ret: T = visitor.visit_raw_expression_type(self) return ret diff --git a/test-data/unit/check-typeddict.test b/test-data/unit/check-typeddict.test index 1ef08f825e7a..6a5120159c2d 100644 --- a/test-data/unit/check-typeddict.test +++ b/test-data/unit/check-typeddict.test @@ -1442,18 +1442,6 @@ reveal_type(x) # N: Revealed type is "TypedDict('__main__.X', {'a': TypedDict('_ reveal_type(x['a']['b']) # N: Revealed type is "builtins.int" [builtins fixtures/dict.pyi] -[case testTypedDictForwardReferenceCacheFineGrained] -# flags: --cache-fine-grained -from mypy_extensions import TypedDict -class A(TypedDict): - b: "B" -class B(TypedDict): - c: "C" -class C(TypedDict): - d: "D" -class D: - pass - [case testSelfRecursiveTypedDictInheriting] from mypy_extensions import TypedDict