diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a9d04b11..65306e7a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,7 @@ repos: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.5 + rev: v0.12.5 hooks: - id: ruff args: ["--fix"] @@ -42,14 +42,14 @@ repos: - id: yesqa - repo: https://github.com/crate-ci/typos - rev: v1.31.1 + rev: v1.34.0 hooks: - id: typos args: [] verbose: true - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.15.0 + rev: v1.17.0 hooks: - id: mypy files: jsonargparse.*/.*.py diff --git a/jsonargparse/_common.py b/jsonargparse/_common.py index d037b0bb..1dd4115f 100644 --- a/jsonargparse/_common.py +++ b/jsonargparse/_common.py @@ -339,7 +339,7 @@ class LoggerProperty: def __init__(self, *args, logger: Union[bool, str, dict, logging.Logger] = False, **kwargs): """Initializer for LoggerProperty class.""" - self.logger = logger # type: ignore[assignment] + self.logger = logger super().__init__(*args, **kwargs) @property diff --git a/jsonargparse/_core.py b/jsonargparse/_core.py index 2c92ef16..b401124e 100644 --- a/jsonargparse/_core.py +++ b/jsonargparse/_core.py @@ -275,7 +275,7 @@ def __init__( self.exit_on_error = exit_on_error self.required_args: Set[str] = set() self.save_path_content: Set[str] = set() - self.default_config_files = default_config_files # type: ignore[assignment] + self.default_config_files = default_config_files self.default_meta = default_meta self.default_env = default_env self.env_prefix = env_prefix diff --git a/jsonargparse/_link_arguments.py b/jsonargparse/_link_arguments.py index dcbe6f8d..a1966ce7 100644 --- a/jsonargparse/_link_arguments.py +++ b/jsonargparse/_link_arguments.py @@ -168,7 +168,7 @@ def __init__( if is_target_subclass: help_dest = f"{self.target[1].dest}.help" for action in group._group_actions: - if action.dest == help_dest: # type: ignore[union-attr] + if action.dest == help_dest: group._group_actions.remove(action) break if group._group_actions and all(isinstance(a, _ActionConfigLoad) for a in group._group_actions):