diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b4a233b95..15eca4c77 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,12 +9,12 @@ repos: - id: trailing-whitespace - id: end-of-file-fixer - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.3 + rev: 0.29.4 hooks: - id: check-github-workflows - id: check-dependabot - repo: https://github.com/asottile/pyupgrade - rev: v3.17.0 + rev: v3.19.0 hooks: - id: pyupgrade args: ["--py38-plus"] @@ -35,7 +35,7 @@ repos: hooks: - id: isort - repo: https://github.com/sirosen/slyp - rev: 0.7.1 + rev: 0.8.1 hooks: - id: slyp - repo: https://github.com/sirosen/texthooks diff --git a/reference/_generate.py b/reference/_generate.py index 11693d308..b4dc15409 100755 --- a/reference/_generate.py +++ b/reference/_generate.py @@ -75,7 +75,7 @@ def _format_option(optstr): class AdocPage: - def __init__(self, ctx): + def __init__(self, ctx) -> None: self.commandname = ctx.command_path self.short_help = ctx.command.get_short_help_str() self.description = textwrap.dedent(ctx.command.help).replace("\b\n", "") diff --git a/src/globus_cli/endpointish/endpointish.py b/src/globus_cli/endpointish/endpointish.py index 3506bc330..3ab75fcfd 100644 --- a/src/globus_cli/endpointish/endpointish.py +++ b/src/globus_cli/endpointish/endpointish.py @@ -19,7 +19,7 @@ def __init__( endpoint_id: str | uuid.UUID, *, transfer_client: globus_sdk.TransferClient, - ): + ) -> None: self._client = transfer_client self.endpoint_id = endpoint_id diff --git a/src/globus_cli/globus_cli_flake8.py b/src/globus_cli/globus_cli_flake8.py index c948f5ae4..ed1804b76 100644 --- a/src/globus_cli/globus_cli_flake8.py +++ b/src/globus_cli/globus_cli_flake8.py @@ -27,7 +27,7 @@ class Plugin: # args to init determine plugin behavior. see: # https://flake8.pycqa.org/en/latest/internal/utils.html#flake8.utils.parameters_for - def __init__(self, tree): + def __init__(self, tree) -> None: self.tree = tree # Plugin.run() is how checks will run. For detail, see implementation of: @@ -40,7 +40,7 @@ def run(self): class ErrorRecordingVisitor(ast.NodeVisitor): - def __init__(self): + def __init__(self) -> None: super().__init__() self.collect = [] diff --git a/src/globus_cli/login_manager/errors.py b/src/globus_cli/login_manager/errors.py index e41641d9f..05023d31e 100644 --- a/src/globus_cli/login_manager/errors.py +++ b/src/globus_cli/login_manager/errors.py @@ -11,7 +11,7 @@ def __init__( self, missing_servers: t.Sequence[str], context: LoginContext, - ): + ) -> None: self.missing_servers = missing_servers error_message = context.error_message or self._default_error_message() diff --git a/src/globus_cli/parsing/param_types/task_path.py b/src/globus_cli/parsing/param_types/task_path.py index bf4a7ff1b..268397404 100644 --- a/src/globus_cli/parsing/param_types/task_path.py +++ b/src/globus_cli/parsing/param_types/task_path.py @@ -66,7 +66,7 @@ def __init__( coerce_to_dir: bool = False, normalize: bool = True, require_absolute: bool = False, - ): + ) -> None: """ Task Paths are paths for passing into Transfer or Delete tasks. They're only slightly more than string types: they can join themselves diff --git a/src/globus_cli/termio/field.py b/src/globus_cli/termio/field.py index a8d4b10d9..c36b37111 100644 --- a/src/globus_cli/termio/field.py +++ b/src/globus_cli/termio/field.py @@ -22,7 +22,7 @@ def __init__( *, wrap_enabled: bool = False, formatter: formatters.FieldFormatter[t.Any] = formatters.Str, - ): + ) -> None: self.name = name self.key = key self.wrap_enabled = wrap_enabled diff --git a/src/globus_cli/termio/formatters/auth.py b/src/globus_cli/termio/formatters/auth.py index dbe8bf8a2..84733a396 100644 --- a/src/globus_cli/termio/formatters/auth.py +++ b/src/globus_cli/termio/formatters/auth.py @@ -27,7 +27,7 @@ class PrincipalFormatter(FieldFormatter[t.Tuple[str, str]]): - fallback """ - def __init__(self, auth_client: globus_sdk.AuthClient): + def __init__(self, auth_client: globus_sdk.AuthClient) -> None: self.auth_client = auth_client self.resolved_ids = globus_sdk.IdentityMap(auth_client) diff --git a/tests/functional/flows/test_create_flow.py b/tests/functional/flows/test_create_flow.py index b4b472ec6..243b6f9f0 100644 --- a/tests/functional/flows/test_create_flow.py +++ b/tests/functional/flows/test_create_flow.py @@ -48,7 +48,7 @@ class IdentityPool: IDENTITY_DATA = FLOW_IDENTITIES - def __init__(self): + def __init__(self) -> None: self.identities = {} self.assigned_sets = {}