Skip to content

Commit

Permalink
Revert "Fix RawExpressionType.accept crash with `--cache-fine-grain…
Browse files Browse the repository at this point in the history
…ed`" (#17637)

Reverts #17588

(cherry picked from commit 41dcf1a)
  • Loading branch information
ilevkivskyi authored and hauntsaninja committed Aug 24, 2024
1 parent 14ab742 commit 778542b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
2 changes: 0 additions & 2 deletions mypy/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2703,8 +2703,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
Expand Down
12 changes: 0 additions & 12 deletions test-data/unit/check-typeddict.test
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 778542b

Please sign in to comment.