Skip to content

Commit 729da57

Browse files
committed
Fix merge issues
1 parent ff4e0a1 commit 729da57

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

extensions/mypy_extensions.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# the (convenient) behavior of types provided by typing module.
1515
from typing import _type_check # type: ignore
1616

17+
1718
def _check_fails(cls, other):
1819
try:
1920
if sys._getframe(1).f_globals['__name__'] not in ['abc', 'functools', 'typing']:
@@ -93,6 +94,10 @@ class Point2D(TypedDict):
9394
syntax forms work for Python 2.7 and 3.2+
9495
"""
9596

97+
98+
# Return type that indicates a function does not return
99+
class NoReturn: pass
100+
96101
def Arg(name=None, typ=Any):
97102
return typ
98103

mypy/fastparse.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ def visit_Ellipsis(self, n: ast3.Ellipsis) -> Type:
10571057
return EllipsisType(line=self.line)
10581058

10591059
# List(expr* elts, expr_context ctx)
1060-
def visit_List(self, n: ast35.List) -> Type:
1060+
def visit_List(self, n: ast3.List) -> Type:
10611061
return self.translate_argument_list(n.elts)
10621062

10631063

@@ -1072,12 +1072,12 @@ class FastParserError(TypeCommentParseError):
10721072
pass
10731073

10741074

1075-
def _extract_str(arg: ast35.expr) -> Optional[str]:
1076-
if isinstance(arg, ast35.Name) and arg.id == 'None':
1075+
def _extract_str(arg: ast3.expr) -> Optional[str]:
1076+
if isinstance(arg, ast3.Name) and arg.id == 'None':
10771077
return None
1078-
elif isinstance(arg, ast35.NameConstant) and arg.value is None:
1078+
elif isinstance(arg, ast3.NameConstant) and arg.value is None:
10791079
return None
1080-
elif isinstance(arg, ast35.Str):
1080+
elif isinstance(arg, ast3.Str):
10811081
return arg.s
10821082
else:
10831083
raise FastParserError("Bad type for name of argument",

0 commit comments

Comments
 (0)