Skip to content

Commit e159ee9

Browse files
authored
Ignore num_workers in the daemon while it is not supported (#21483)
Fixes #21475 Avoid the crash while we don't support this. The actual feature is tracked in #21346
1 parent d7f7036 commit e159ee9

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

mypy/dmypy_server.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,17 @@ def __init__(self, options: Options, status_file: str, timeout: int | None = Non
192192
options.show_traceback = True
193193
if options.use_fine_grained_cache:
194194
# Using fine_grained_cache implies generating and caring
195-
# about the fine grained cache
195+
# about the fine-grained cache.
196196
options.cache_fine_grained = True
197197
else:
198198
options.cache_dir = os.devnull
199199
# Fine-grained incremental doesn't support general partial types
200200
# (details in https://github.com/python/mypy/issues/4492)
201201
options.local_partial_types = True
202+
# We don't support parallel checking in fine-grained mode yet.
203+
# Ignore it for now, so that same config file can be used with
204+
# mypy and with the daemon.
205+
options.num_workers = 0
202206
self.status_file = status_file
203207

204208
# Since the object is created in the parent process we can check

0 commit comments

Comments
 (0)