From 990ea75737d34d7f4bc29d6ce6eed209d5432bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20Gr=C3=A4nsbo?= Date: Mon, 25 Jan 2021 21:15:24 +0100 Subject: [PATCH] Make --explicit-package-bases invertible --- mypy/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mypy/main.py b/mypy/main.py index ab38f7478b3f..8e5b79a768b0 100644 --- a/mypy/main.py +++ b/mypy/main.py @@ -788,9 +788,10 @@ def add_invertible_flag(flag: str, title="Running code", description="Specify the code you want to type check. For more details, see " "mypy.readthedocs.io/en/latest/running_mypy.html#running-mypy") - code_group.add_argument( - '--explicit-package-bases', action='store_true', - help="Use current directory and MYPYPATH to determine module names of files passed") + add_invertible_flag( + '--explicit-package-bases', default=False, + help="Use current directory and MYPYPATH to determine module names of files passed", + group=code_group) code_group.add_argument( '-m', '--module', action='append', metavar='MODULE', default=[],