diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0987bad90..d6fe630d3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,20 +7,20 @@ files: | )/.*\.py$ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.10 + rev: v0.16.0 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --no-cache] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.13.0 + rev: v2.3.0 hooks: - id: mypy additional_dependencies: - types-requests - types-python-dateutil - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.4 + rev: 0.37.4 hooks: - id: check-github-workflows files: '^github/workflows/.*\.ya?ml$' @@ -28,7 +28,7 @@ repos: - id: check-dependabot files: '^\.github/dependabot\.ya?ml$' - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-added-large-files files: ".*" diff --git a/openml/cli.py b/openml/cli.py index 1415d0af9..323fdde99 100644 --- a/openml/cli.py +++ b/openml/cli.py @@ -254,7 +254,7 @@ def autocomplete_policy(policy: str) -> str: def configure_field( # noqa: PLR0913 field: str, - value: None | str, + value: str | None, check_with_message: Callable[[str], str], intro_message: str, input_message: str, diff --git a/openml/datasets/dataset.py b/openml/datasets/dataset.py index 59d6205ba..2fbb69a5c 100644 --- a/openml/datasets/dataset.py +++ b/openml/datasets/dataset.py @@ -838,7 +838,7 @@ def _load_qualities(self) -> None: else: self._qualities = _read_qualities(qualities_file) - def retrieve_class_labels(self, target_name: str = "class") -> None | list[str]: + def retrieve_class_labels(self, target_name: str = "class") -> list[str] | None: """Reads the datasets arff to determine the class-labels. If the task has no class labels (for example a regression problem)