Skip to content

Commit b79d368

Browse files
committed
Expose --fixed-format-cache if compiled
1 parent 4f872d7 commit b79d368

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

mypy/main.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ def infer_python_executable(options: Options, special_opts: argparse.Namespace)
338338
options.python_executable = python_executable
339339

340340

341+
compilation_status: Final = "no" if __file__.endswith(".py") else "yes"
342+
341343
HEADER: Final = """%(prog)s [-h] [-v] [-V] [more options; see below]
342344
[-m MODULE] [-p PACKAGE] [-c PROGRAM_TEXT] [files ...]"""
343345

@@ -557,7 +559,6 @@ def add_invertible_flag(
557559
"-v", "--verbose", action="count", dest="verbosity", help="More verbose messages"
558560
)
559561

560-
compilation_status = "no" if __file__.endswith(".py") else "yes"
561562
general_group.add_argument(
562563
"-V",
563564
"--version",
@@ -1064,7 +1065,13 @@ def add_invertible_flag(
10641065
help="Include fine-grained dependency information in the cache for the mypy daemon",
10651066
)
10661067
incremental_group.add_argument(
1067-
"--fixed-format-cache", action="store_true", help=argparse.SUPPRESS
1068+
"--fixed-format-cache",
1069+
action="store_true",
1070+
help=(
1071+
"Use experimental fast and compact fixed format cache"
1072+
if compilation_status == "yes"
1073+
else argparse.SUPPRESS
1074+
),
10681075
)
10691076
incremental_group.add_argument(
10701077
"--skip-version-check",

0 commit comments

Comments
 (0)