Skip to content

Commit

Permalink
Delete fastparse2.py (#13251)
Browse files Browse the repository at this point in the history
We don't need it anymore as mypy now fails unconditionally if Python 2 version is selected.

Ref #12237

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
  • Loading branch information
ilevkivskyi and Ivan Levkivskyi committed Jul 27, 2022
1 parent 1fa71c4 commit 086e823
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1,193 deletions.
9 changes: 0 additions & 9 deletions mypy/fastparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -1821,15 +1821,6 @@ def note(self, msg: str, line: int, column: int) -> None:
def translate_expr_list(self, l: Sequence[ast3.expr]) -> List[Type]:
return [self.visit(e) for e in l]

def visit_raw_str(self, s: str) -> Type:
# An escape hatch that allows the AST walker in fastparse2 to
# directly hook into the Python 3 type converter in some cases
# without needing to create an intermediary `Str` object.
_, typ = parse_type_comment(
s.strip(), self.line, -1, self.errors, self.assume_str_is_unicode
)
return typ or AnyType(TypeOfAny.from_error)

def visit_Call(self, e: Call) -> Type:
# Parse the arg constructor
f = e.func
Expand Down
Loading

0 comments on commit 086e823

Please sign in to comment.