Skip to content

Commit 086e823

Browse files
ilevkivskyiIvan Levkivskyi
andauthored
Delete fastparse2.py (#13251)
We don't need it anymore as mypy now fails unconditionally if Python 2 version is selected. Ref #12237 Co-authored-by: Ivan Levkivskyi <[email protected]>
1 parent 1fa71c4 commit 086e823

File tree

3 files changed

+2
-1193
lines changed

3 files changed

+2
-1193
lines changed

mypy/fastparse.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,15 +1821,6 @@ def note(self, msg: str, line: int, column: int) -> None:
18211821
def translate_expr_list(self, l: Sequence[ast3.expr]) -> List[Type]:
18221822
return [self.visit(e) for e in l]
18231823

1824-
def visit_raw_str(self, s: str) -> Type:
1825-
# An escape hatch that allows the AST walker in fastparse2 to
1826-
# directly hook into the Python 3 type converter in some cases
1827-
# without needing to create an intermediary `Str` object.
1828-
_, typ = parse_type_comment(
1829-
s.strip(), self.line, -1, self.errors, self.assume_str_is_unicode
1830-
)
1831-
return typ or AnyType(TypeOfAny.from_error)
1832-
18331824
def visit_Call(self, e: Call) -> Type:
18341825
# Parse the arg constructor
18351826
f = e.func

0 commit comments

Comments
 (0)