Skip to content

Commit e1df545

Browse files
committed
Ignore arg-type error in CLI functions
Since click 8.1.4, mypy fails to deduce the correct types in the click type annotations for click.command. See pallets/click#2558 and python/mypy#13449. For now, workaround by ignoring the arg-type error.
1 parent 722414f commit e1df545

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

distributed/cli/dask_scheduler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
pem_file_option_type = click.Path(exists=True, resolve_path=True)
2626

2727

28-
@click.command(name="scheduler", context_settings=dict(ignore_unknown_options=True))
28+
@click.command(name="scheduler", context_settings=dict(ignore_unknown_options=True)) # type: ignore[arg-type]
2929
@click.option("--host", type=str, default="", help="URI, IP or hostname of this server")
3030
@click.option("--port", type=str, default=None, help="Serving port")
3131
@click.option(

distributed/cli/dask_spec.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from distributed.deploy.spec import run_spec
1111

1212

13-
@click.command(name="spec", context_settings=dict(ignore_unknown_options=True))
13+
@click.command(name="spec", context_settings=dict(ignore_unknown_options=True)) # type: ignore[arg-type]
1414
@click.argument("args", nargs=-1)
1515
@click.option("--spec", type=str, default="", help="")
1616
@click.option("--spec-file", type=str, default=None, help="")

distributed/cli/dask_ssh.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
logger = logging.getLogger("distributed.dask_ssh")
1313

1414

15-
@click.command(
15+
@click.command( # type: ignore[arg-type]
1616
name="ssh",
1717
help=dedent(
1818
"""Launch a Dask cluster over SSH. A 'dask scheduler' process will run on the

distributed/cli/dask_worker.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
pem_file_option_type = click.Path(exists=True, resolve_path=True)
3636

3737

38-
@click.command(name="worker", context_settings=dict(ignore_unknown_options=True))
38+
@click.command(name="worker", context_settings=dict(ignore_unknown_options=True)) # type: ignore[arg-type]
3939
@click.argument("scheduler", type=str, required=False)
4040
@click.option(
4141
"--tls-ca-file",

0 commit comments

Comments
 (0)