Skip to content

Commit 2ac722a

Browse files
Make --explicit-package-bases invertible (#9969)
Closes #9968 This PR adds the inverse of --explicit-package-bases: --no-explicit-package-bases. The flag can be used if you want to override explicit_package_bases = True which was set in a configuration file.
1 parent 8d57ffa commit 2ac722a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mypy/main.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -805,9 +805,10 @@ def add_invertible_flag(flag: str,
805805
title="Running code",
806806
description="Specify the code you want to type check. For more details, see "
807807
"mypy.readthedocs.io/en/stable/running_mypy.html#running-mypy")
808-
code_group.add_argument(
809-
'--explicit-package-bases', action='store_true',
810-
help="Use current directory and MYPYPATH to determine module names of files passed")
808+
add_invertible_flag(
809+
'--explicit-package-bases', default=False,
810+
help="Use current directory and MYPYPATH to determine module names of files passed",
811+
group=code_group)
811812
code_group.add_argument(
812813
"--exclude",
813814
metavar="PATTERN",

0 commit comments

Comments
 (0)