Skip to content

Commit 7333b60

Browse files
committed
Change config option name to follow-untyped-imports
1 parent 0ab6608 commit 7333b60

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

mypy/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ def add_invertible_flag(
581581
help="Silently ignore imports of missing modules",
582582
)
583583
imports_group.add_argument(
584-
"--enable-installed-packages",
584+
"--follow-untyped-imports",
585585
action="store_true",
586586
help="Typecheck modules without stubs or py.typed marker",
587587
)

mypy/modulefinder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ def _find_module_non_stub_helper(
353353
if plausible_match:
354354
if self.options:
355355
module_specific_options = self.options.clone_for_module(id)
356-
if module_specific_options.enable_installed_packages:
356+
if module_specific_options.follow_untyped_imports:
357357
# print("Returning ", id)
358358
return os.path.join(pkg_dir, *components[:-1]), False
359359
return ModuleNotFoundReason.FOUND_WITHOUT_TYPE_HINTS

mypy/options.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ class BuildType:
3939
"disallow_untyped_defs",
4040
"enable_error_code",
4141
"enabled_error_codes",
42-
"enable_installed_packages",
4342
"extra_checks",
4443
"follow_imports_for_stubs",
4544
"follow_imports",
45+
"follow_untyped_imports",
4646
"ignore_errors",
4747
"ignore_missing_imports",
4848
"implicit_optional",
@@ -115,7 +115,7 @@ def __init__(self) -> None:
115115
# Is ignore_missing_imports set in a per-module section
116116
self.ignore_missing_imports_per_module = False
117117
# Typecheck modules without stubs or py.typed marker
118-
self.enable_installed_packages = False
118+
self.follow_untyped_imports = False
119119
self.follow_imports = "normal" # normal|silent|skip|error
120120
# Whether to respect the follow_imports setting even for stub files.
121121
# Intended to be used for disabling specific stubs.

test-data/unit/pep561.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ testNamespacePkgWStubsWithNamespacePackagesFlag.py:8: error: Argument 1 to "bf"
189189

190190
[case testMissingPytypedFlag]
191191
# pkgs: typedpkg_ns_b
192-
# flags: --namespace-packages --enable-installed-packages
192+
# flags: --namespace-packages --follow-untyped-imports
193193
import typedpkg_ns.b.bbb as b
194194
b.bf("foo", "bar")
195195
[out]

0 commit comments

Comments
 (0)