Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mypy/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1551,6 +1551,10 @@ def exclude_from_backups(target_dir: str) -> None:

def create_metastore(options: Options, parallel_worker: bool = False) -> MetadataStore:
"""Create the appropriate metadata store."""
if not options.incremental:
# When incremental mode is disabled, use a no-op store to avoid
# creating a .mypy_cache directory.
return FilesystemMetadataStore(os.devnull)
if options.sqlite_cache:
# We use this flag in both coordinator and workers to seep up commits,
# see mypy.metastore.connect_db() for details.
Expand Down