Skip to content

Commit 1b206eb

Browse files
authored
Support .ff files with --cache-map (#21633)
Previously only the .json extension was accepted, but we are now generating .ff cache files by default.
1 parent 862af99 commit 1b206eb

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

mypy/main.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,13 +1677,15 @@ def process_cache_map(
16771677
parser.error(f"Duplicate --cache-map source {source})")
16781678
if not source.endswith(".py") and not source.endswith(".pyi"):
16791679
parser.error(f"Invalid --cache-map source {source} (triple[0] must be *.py[i])")
1680-
if not meta_file.endswith(".meta.json"):
1680+
if not meta_file.endswith((".meta.json", ".meta.ff")):
16811681
parser.error(
1682-
"Invalid --cache-map meta_file %s (triple[1] must be *.meta.json)" % meta_file
1682+
"Invalid --cache-map meta_file %s (triple[1] must be *.meta.json or *.meta.ff)"
1683+
% meta_file
16831684
)
1684-
if not data_file.endswith(".data.json"):
1685+
if not data_file.endswith((".data.json", ".data.ff")):
16851686
parser.error(
1686-
"Invalid --cache-map data_file %s (triple[2] must be *.data.json)" % data_file
1687+
"Invalid --cache-map data_file %s (triple[2] must be *.data.json or *.data.ff)"
1688+
% data_file
16871689
)
16881690
options.cache_map[source] = (meta_file, data_file)
16891691

0 commit comments

Comments
 (0)