File tree 5 files changed +8
-13
lines changed
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:
139
139
140
140
Import and inspect modules instead of parsing source code. This is the default
141
141
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
144
144
code parsing. Implies :option: `--no-analysis ` as analysis requires source
145
145
code.
146
146
Original file line number Diff line number Diff line change 42
42
from __future__ import annotations
43
43
44
44
import argparse
45
- import glob
46
45
import keyword
47
46
import os
48
47
import os .path
49
48
import sys
50
49
import traceback
51
- from collections import defaultdict
52
- from typing import Final , Iterable , Mapping
50
+ from typing import Final , Iterable
53
51
from typing_extensions import Final
54
52
55
53
import mypy .build
113
111
from mypy .stubdoc import ArgSig , FunctionSig
114
112
from mypy .stubgenc import InspectionStubGenerator , generate_stub_for_c_module
115
113
from mypy .stubutil import (
114
+ BaseStubGenerator ,
116
115
CantImport ,
117
116
ClassInfo ,
118
117
FunctionContext ,
119
- BaseStubGenerator ,
120
118
common_dir_prefix ,
121
119
fail_missing ,
122
120
find_module_path_and_all_py3 ,
Original file line number Diff line number Diff line change 11
11
import inspect
12
12
import keyword
13
13
import os .path
14
- import re
15
- from abc import abstractmethod
16
14
from types import FunctionType , ModuleType
17
- from typing import Any , Final , Mapping
15
+ from typing import Any , Mapping
18
16
19
17
from mypy .fastparse import parse_type_comment
20
18
from mypy .moduleinspect import is_c_module
31
29
parse_all_signatures ,
32
30
)
33
31
from mypy .stubutil import (
32
+ BaseStubGenerator ,
34
33
ClassInfo ,
35
34
FunctionContext ,
36
35
SignatureGenerator ,
37
- BaseStubGenerator ,
38
36
infer_method_ret_type ,
39
37
)
40
38
@@ -587,7 +585,7 @@ def _fix_iter(
587
585
ctx .class_info
588
586
and ctx .class_info .cls is not None
589
587
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__
591
589
):
592
590
item_type : str | None = None
593
591
for sig in inferred :
Original file line number Diff line number Diff line change 2
2
3
3
from __future__ import annotations
4
4
5
- import keyword
6
5
import os .path
7
6
import re
8
7
import sys
Original file line number Diff line number Diff line change @@ -2853,7 +2853,7 @@ __uri__ = ''
2853
2853
__version__ = ''
2854
2854
2855
2855
[out]
2856
- from m import __version__ as __version__
2856
+ from m import __version__ as __version__
2857
2857
2858
2858
class A: ...
2859
2859
You can’t perform that action at this time.
0 commit comments