Skip to content

Commit 839f16a

Browse files
gvanrossumddfisher
authored andcommitted
Sync typeshed (#1849)
* SplitNamespace should derive from Namespace. * Add band-aid type-ignore to make tests pass. See #1846. * Sync typeshed.
1 parent 0802d7f commit 839f16a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

mypy/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def type_check_only(sources: List[BuildSource],
8585
MYPYPATH additional module search path"""
8686

8787

88-
class SplitNamespace:
88+
class SplitNamespace(argparse.Namespace):
8989
def __init__(self, standard_namespace: object, alt_namespace: object, alt_prefix: str) -> None:
9090
self.__dict__['_standard_namespace'] = standard_namespace
9191
self.__dict__['_alt_namespace'] = alt_namespace

test-data/stdlib-samples/3.2/test/test_random.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def test_seedargs(self) -> None:
4646
for arg in [list(range(3)), {'one': 1}]:
4747
self.assertRaises(TypeError, self.gen.seed, arg)
4848
self.assertRaises(TypeError, self.gen.seed, 1, 2, 3, 4)
49-
self.assertRaises(TypeError, type(self.gen), [])
49+
self.assertRaises(TypeError, type(self.gen), []) # type: ignore # mypy issue 1846
5050

5151
def test_choice(self) -> None:
5252
choice = self.gen.choice

0 commit comments

Comments
 (0)