File tree Expand file tree Collapse file tree 5 files changed +8
-13
lines changed
Expand file tree Collapse file tree 5 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -139,8 +139,8 @@ alter the default behavior:
139139
140140 Import and inspect modules instead of parsing source code. This is the default
141141 behavior for c modules and pyc-only packages. The flag is useful to force
142- inspection for pure python modules that make use of dynamically generated
143- members that would otherwiswe be omitted when using the default behavior of
142+ inspection for pure python modules that make use of dynamically generated
143+ members that would otherwiswe be omitted when using the default behavior of
144144 code parsing. Implies :option: `--no-analysis ` as analysis requires source
145145 code.
146146
Original file line number Diff line number Diff line change 4242from __future__ import annotations
4343
4444import argparse
45- import glob
4645import keyword
4746import os
4847import os .path
4948import sys
5049import traceback
51- from collections import defaultdict
52- from typing import Final , Iterable , Mapping
50+ from typing import Final , Iterable
5351from typing_extensions import Final
5452
5553import mypy .build
113111from mypy .stubdoc import ArgSig , FunctionSig
114112from mypy .stubgenc import InspectionStubGenerator , generate_stub_for_c_module
115113from mypy .stubutil import (
114+ BaseStubGenerator ,
116115 CantImport ,
117116 ClassInfo ,
118117 FunctionContext ,
119- BaseStubGenerator ,
120118 common_dir_prefix ,
121119 fail_missing ,
122120 find_module_path_and_all_py3 ,
Original file line number Diff line number Diff line change 1111import inspect
1212import keyword
1313import os .path
14- import re
15- from abc import abstractmethod
1614from types import FunctionType , ModuleType
17- from typing import Any , Final , Mapping
15+ from typing import Any , Mapping
1816
1917from mypy .fastparse import parse_type_comment
2018from mypy .moduleinspect import is_c_module
3129 parse_all_signatures ,
3230)
3331from mypy .stubutil import (
32+ BaseStubGenerator ,
3433 ClassInfo ,
3534 FunctionContext ,
3635 SignatureGenerator ,
37- BaseStubGenerator ,
3836 infer_method_ret_type ,
3937)
4038
@@ -587,7 +585,7 @@ def _fix_iter(
587585 ctx .class_info
588586 and ctx .class_info .cls is not None
589587 and ctx .name == "__getitem__"
590- and "__iter__" not in getattr ( ctx .class_info .cls , " __dict__" )
588+ and "__iter__" not in ctx .class_info .cls . __dict__
591589 ):
592590 item_type : str | None = None
593591 for sig in inferred :
Original file line number Diff line number Diff line change 22
33from __future__ import annotations
44
5- import keyword
65import os .path
76import re
87import sys
Original file line number Diff line number Diff line change @@ -2853,7 +2853,7 @@ __uri__ = ''
28532853__version__ = ''
28542854
28552855[out]
2856- from m import __version__ as __version__
2856+ from m import __version__ as __version__
28572857
28582858class A: ...
28592859
You can’t perform that action at this time.
0 commit comments