Skip to content

Commit a7128e9

Browse files
committed
Fix issues preventing mypy running
1 parent 356141e commit a7128e9

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ repos:
3939
additional_dependencies: ["toml"] # Needed to parse pyproject.toml
4040

4141
- repo: https://github.com/pre-commit/mirrors-mypy
42-
rev: v0.942
42+
rev: v0.961
4343
hooks:
4444
- id: mypy
4545
name: mypy auto-sklearn

autosklearn/util/single_thread_client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from pathlib import Path
55

66
import dask.distributed
7+
from dask.distributed.util import no_default
78

89

910
class DummyFuture(dask.distributed.Future):
@@ -18,7 +19,7 @@ def __init__(self, result: typing.Any) -> None:
1819
def result(self, timeout: typing.Optional[int] = None) -> typing.Any:
1920
return self._result
2021

21-
def cancel(self) -> None:
22+
def cancel(self, **kwargs) -> None:
2223
pass
2324

2425
def done(self) -> bool:
@@ -88,7 +89,7 @@ def submit(
8889
"""
8990
return DummyFuture(func(*args, **kwargs))
9091

91-
def close(self) -> None:
92+
def close(self, timeout=no_default) -> None:
9293
pass
9394

9495
def shutdown(self) -> None:
@@ -104,7 +105,7 @@ def _get_scheduler_info(self) -> typing.Dict:
104105
"type": "Scheduler",
105106
}
106107

107-
def nthreads(self) -> typing.Dict:
108+
def nthreads(self, workers=None, **kwargs) -> typing.Dict:
108109
return {
109110
"127.0.0.1": 1,
110111
}

0 commit comments

Comments
 (0)