Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mypy --no-implicit-optional #6606

Merged
merged 2 commits into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion distributed/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4057,7 +4057,7 @@ def log_event(self, topic: str | Collection[str], msg: Any):
"""
return self.sync(self.scheduler.log_event, topic=topic, msg=msg)

def get_events(self, topic: str = None):
def get_events(self, topic: str | None = None):
"""Retrieve structured topic logs

Parameters
Expand Down
2 changes: 1 addition & 1 deletion distributed/shuffle/shuffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_ext() -> ShuffleWorkerExtension:
def shuffle_transfer(
input: pd.DataFrame,
id: ShuffleId,
npartitions: int = None,
npartitions: int | None = None,
column: str | None = None,
) -> None:
get_ext().add_partition(input, id, npartitions=npartitions, column=column)
Expand Down
2 changes: 1 addition & 1 deletion distributed/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1715,7 +1715,7 @@ def update_data(
self,
data: dict[str, object],
report: bool = True,
stimulus_id: str = None,
stimulus_id: str | None = None,
) -> dict[str, Any]:
self.handle_stimulus(
UpdateDataEvent(
Expand Down
2 changes: 1 addition & 1 deletion distributed/worker_state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ def __init__(
*,
nthreads: int = 1,
address: str | None = None,
data: MutableMapping[str, object] = None,
data: MutableMapping[str, object] | None = None,
threads: dict[str, int] | None = None,
plugins: dict[str, WorkerPlugin] | None = None,
resources: Mapping[str, float] | None = None,
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ platform = linux
allow_incomplete_defs = false
allow_untyped_decorators = false
ignore_missing_imports = true
no_implicit_optional = true
show_error_codes = true
warn_redundant_casts = true
warn_unused_ignores = true
Expand All @@ -123,6 +124,7 @@ warn_unreachable = true
allow_incomplete_defs = true
[mypy-distributed.scheduler]
allow_incomplete_defs = true
no_implicit_optional = false
[mypy-distributed.worker]
allow_incomplete_defs = true

Expand Down