Skip to content

Commit 41b6e46

Browse files
committed
Fix test failures after rebase
1 parent 06dd279 commit 41b6e46

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

mypy/build.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ def default_lib_path(data_dir: str, target: int, pyversion: int,
214214
if pyversion == 2:
215215
major, minor = 2, 7
216216
else:
217-
major, minor = sys.version_info[:2]
217+
# See bug #886
218+
major, minor = sys.version_info[0], sys.version_info[1]
218219
version_dir = '3.2'
219220
third_party_dir = 'third-party-3.2'
220221
if pyversion < 3:

mypy/myunit/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import time
77
import traceback
88

9-
from typing import List, Tuple, Any, Callable, Union
9+
from typing import List, Tuple, Any, Callable, Union, cast
1010

1111

1212
# TODO remove global state
@@ -170,7 +170,7 @@ def add_suites_from_module(suites: List[Suite], mod_name: str) -> None:
170170
for suite in mod.__dict__.values():
171171
if isinstance(suite, type) and issubclass(suite, Suite) and suite is not Suite:
172172
got_suite = True
173-
suites.append(suite())
173+
suites.append(cast(Callable[[], Suite], suite)())
174174
if not got_suite:
175175
# Sanity check in case e.g. it uses unittest instead of a myunit.
176176
# The codecs tests do since they need to be python2-compatible.

mypy/nodes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def get_line(self) -> int: pass
7171
}
7272

7373
reverse_type_aliases = dict((name.replace('__builtins__', 'builtins'), alias)
74-
for alias, name in type_aliases.items())
74+
for alias, name in type_aliases.items()) # type: Dict[str, str]
7575

7676

7777
class Node(Context):
@@ -1045,7 +1045,7 @@ def accept(self, visitor: NodeVisitor[T]) -> T:
10451045
'>': '__gt__',
10461046
'<=': '__le__',
10471047
'in': '__contains__',
1048-
}
1048+
} # type: Dict[str, str]
10491049

10501050
ops_with_inplace_method = {
10511051
'+', '-', '*', '/', '%', '//', '**', '&', '|', '^', '<<', '>>'}

stubs/3.3/ipaddress.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ class IPv6Interface(IPv6Address):
194194
class IPv6Network(_BaseV6, _BaseNetwork):
195195
network_address = ... # type: Any
196196
netmask = ... # type: Any
197-
hosts = ... # type: Any
198197
def __init__(self, address, strict=True): ...
199198
def hosts(self): ...
200199
@property

0 commit comments

Comments
 (0)