We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a7a231 commit 69e5d31Copy full SHA for 69e5d31
mypy/indirection.py
@@ -9,12 +9,12 @@
9
from mypy.util import split_module_names
10
11
12
-def extract_module_names(symbol_name: str) -> Iterable[str]:
13
- """Return the module and parent modules of a fully qualified symbol name."""
14
- if symbol_name is not None:
15
- while '.' in symbol_name:
16
- symbol_name = symbol_name.rsplit('.', 1)[0]
17
- yield symbol_name
+def extract_module_names(type_name: Optional[str]) -> Iterable[str]:
+ """Returns the module name of a fully qualified type name."""
+ if type_name is not None:
+ while '.' in type_name:
+ type_name = type_name.rsplit('.', 1)[0]
+ yield type_name
18
19
20
class TypeIndirectionVisitor(TypeVisitor[Set[str]]):
0 commit comments