Skip to content

Commit 49ee495

Browse files
committed
name fix
1 parent 592a3c0 commit 49ee495

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

mypy/stubgen.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,15 +1246,15 @@ def remove_blacklisted_modules(modules: list[StubSource]) -> list[StubSource]:
12461246
]
12471247

12481248

1249-
def split_pyi_from_py(modules: list[StubSource]) -> tuple[list[StubSource], list[StubSource]]:
1249+
def split_pyc_from_py(modules: list[StubSource]) -> tuple[list[StubSource], list[StubSource]]:
12501250
py_modules = []
1251-
pyi_modules = []
1251+
pyc_modules = []
12521252
for mod in modules:
12531253
if is_pyc_only(mod.path):
1254-
pyi_modules.append(mod)
1254+
pyc_modules.append(mod)
12551255
else:
12561256
py_modules.append(mod)
1257-
return pyi_modules, py_modules
1257+
return pyc_modules, py_modules
12581258

12591259

12601260
def is_blacklisted_path(path: str) -> bool:
@@ -1272,7 +1272,7 @@ def collect_build_targets(
12721272
) -> tuple[list[StubSource], list[StubSource], list[StubSource]]:
12731273
"""Collect files for which we need to generate stubs.
12741274
1275-
Return list of Python modules and C modules.
1275+
Return list of py modules, pyc modules, and C modules.
12761276
"""
12771277
if options.packages or options.modules:
12781278
if options.no_import:
@@ -1295,8 +1295,8 @@ def collect_build_targets(
12951295
c_modules = []
12961296

12971297
py_modules = remove_blacklisted_modules(py_modules)
1298-
pyi_mod, py_mod = split_pyi_from_py(py_modules)
1299-
return py_mod, pyi_mod, c_modules
1298+
pyc_mod, py_mod = split_pyc_from_py(py_modules)
1299+
return py_mod, pyc_mod, c_modules
13001300

13011301

13021302
def find_module_paths_using_imports(
@@ -1524,13 +1524,13 @@ def generate_stub_for_py_module(
15241524
def generate_stubs(options: Options) -> None:
15251525
"""Main entry point for the program."""
15261526
mypy_opts = mypy_options(options)
1527-
py_modules, pyi_modules, c_modules = collect_build_targets(options, mypy_opts)
1528-
all_modules = py_modules + pyi_modules + c_modules
1527+
py_modules, pyc_modules, c_modules = collect_build_targets(options, mypy_opts)
1528+
all_modules = py_modules + pyc_modules + c_modules
15291529
all_module_names = sorted(m.module for m in all_modules)
15301530
# Use parsed sources to generate stubs for Python modules.
15311531
generate_asts_for_modules(py_modules, options.parse_only, mypy_opts, options.verbose)
15321532
files = []
1533-
for mod in py_modules + pyi_modules:
1533+
for mod in py_modules + pyc_modules:
15341534
assert mod.path is not None, "Not found module was not skipped"
15351535
target = mod.module.replace(".", "/")
15361536
if os.path.basename(mod.path) in ["__init__.py", "__init__.pyc"]:
@@ -1544,7 +1544,7 @@ def generate_stubs(options: Options) -> None:
15441544
mod,
15451545
target,
15461546
options.parse_only,
1547-
options.inspect or mod in pyi_modules,
1547+
options.inspect or mod in pyc_modules,
15481548
options.include_private,
15491549
options.export_less,
15501550
doc_dir=options.doc_dir,

0 commit comments

Comments
 (0)