From 9abc3730a0b31f9fe701a2f1c776bfbcceafcd81 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Fri, 21 Jul 2023 10:59:37 -0400 Subject: [PATCH 1/3] Revert "suppress the new click mypy errors", Click 8.1.6 fixed the issue. This reverts commit dfd34cfc0b8a4fccb5e39f2b825442b662a0a2fb. --- newsfragments/4050.minor | 0 src/allmydata/cli/grid_manager.py | 15 +++++++-------- 2 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 newsfragments/4050.minor diff --git a/newsfragments/4050.minor b/newsfragments/4050.minor new file mode 100644 index 000000000..e69de29bb diff --git a/src/allmydata/cli/grid_manager.py b/src/allmydata/cli/grid_manager.py index 039f0f50f..3110a072e 100644 --- a/src/allmydata/cli/grid_manager.py +++ b/src/allmydata/cli/grid_manager.py @@ -28,7 +28,7 @@ from allmydata.grid_manager import ( from allmydata.util import jsonbytes as json -@click.group() # type: ignore[arg-type] +@click.group() @click.option( '--config', '-c', type=click.Path(), @@ -71,7 +71,7 @@ def grid_manager(ctx, config): ctx.obj = Config() -@grid_manager.command() # type: ignore[attr-defined] +@grid_manager.command() @click.pass_context def create(ctx): """ @@ -91,7 +91,7 @@ def create(ctx): ) -@grid_manager.command() # type: ignore[attr-defined] +@grid_manager.command() @click.pass_obj def public_identity(config): """ @@ -103,7 +103,7 @@ def public_identity(config): click.echo(config.grid_manager.public_identity()) -@grid_manager.command() # type: ignore[arg-type, attr-defined] +@grid_manager.command() @click.argument("name") @click.argument("public_key", type=click.STRING) @click.pass_context @@ -132,7 +132,7 @@ def add(ctx, name, public_key): return 0 -@grid_manager.command() # type: ignore[arg-type, attr-defined] +@grid_manager.command() @click.argument("name") @click.pass_context def remove(ctx, name): @@ -155,8 +155,7 @@ def remove(ctx, name): save_grid_manager(fp, ctx.obj.grid_manager, create=False) -@grid_manager.command() # type: ignore[attr-defined] - # noqa: F811 +@grid_manager.command() # noqa: F811 @click.pass_context def list(ctx): """ @@ -176,7 +175,7 @@ def list(ctx): click.echo("expired {} ({})".format(cert.expires, abbreviate_time(delta))) -@grid_manager.command() # type: ignore[arg-type, attr-defined] +@grid_manager.command() @click.argument("name") @click.argument( "expiry_days", From 6cc517d1a7aab78858d6703c98a57c447ba78162 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Fri, 21 Jul 2023 11:04:51 -0400 Subject: [PATCH 2/3] Newer mypy. --- tox.ini | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 127cd9178..b2997c05b 100644 --- a/tox.ini +++ b/tox.ini @@ -125,9 +125,8 @@ commands = [testenv:typechecks] basepython = python3 deps = - mypy==1.3.0 - # When 0.9.2 comes out it will work with 1.3, it's just unreleased at the moment... - git+https://github.com/shoobx/mypy-zope@f276030 + mypy==1.4.1 + mypy-zope types-mock types-six types-PyYAML From 4bbde0288e3fc10b7aca891a5c5b88897c6bb103 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Fri, 21 Jul 2023 11:10:54 -0400 Subject: [PATCH 3/3] Upgrade ruff. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index b2997c05b..67a089b0c 100644 --- a/tox.ini +++ b/tox.ini @@ -99,7 +99,7 @@ skip_install = true deps = # Pin a specific version so we get consistent outcomes; update this # occasionally: - ruff == 0.0.263 + ruff == 0.0.278 # towncrier doesn't work with importlib_resources 6.0.0 # https://github.com/twisted/towncrier/issues/528 importlib_resources < 6.0.0