diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c97e510e6..3505c316b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ files: | )/.*\.py$ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.11 + rev: v0.1.13 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --no-cache] diff --git a/openml/base.py b/openml/base.py index cda2152bd..37693a2ec 100644 --- a/openml/base.py +++ b/openml/base.py @@ -23,7 +23,7 @@ def __repr__(self) -> str: @property @abstractmethod - def id(self) -> int | None: # noqa: A003 + def id(self) -> int | None: """The id of the entity, it is unique for its entity type.""" @property diff --git a/openml/datasets/dataset.py b/openml/datasets/dataset.py index 192f685ae..0c9da1caf 100644 --- a/openml/datasets/dataset.py +++ b/openml/datasets/dataset.py @@ -272,7 +272,7 @@ def qualities(self) -> dict[str, float] | None: return self._qualities @property - def id(self) -> int | None: # noqa: A003 + def id(self) -> int | None: """Get the dataset numeric id.""" return self.dataset_id diff --git a/openml/flows/flow.py b/openml/flows/flow.py index dfc40515d..4e437e35c 100644 --- a/openml/flows/flow.py +++ b/openml/flows/flow.py @@ -165,7 +165,7 @@ def __init__( # noqa: PLR0913 self._extension = extension @property - def id(self) -> int | None: # noqa: A003 + def id(self) -> int | None: """The ID of the flow.""" return self.flow_id diff --git a/openml/runs/run.py b/openml/runs/run.py index a53184895..766f8c97f 100644 --- a/openml/runs/run.py +++ b/openml/runs/run.py @@ -169,7 +169,7 @@ def predictions(self) -> pd.DataFrame: return self._predictions @property - def id(self) -> int | None: # noqa: A003 + def id(self) -> int | None: """The ID of the run, None if not uploaded to the server yet.""" return self.run_id diff --git a/openml/study/study.py b/openml/study/study.py index 0d6e6a72c..83bbf0497 100644 --- a/openml/study/study.py +++ b/openml/study/study.py @@ -95,7 +95,7 @@ def _entity_letter(cls) -> str: return "s" @property - def id(self) -> int | None: # noqa: A003 + def id(self) -> int | None: """Return the id of the study.""" return self.study_id diff --git a/openml/tasks/task.py b/openml/tasks/task.py index fbc0985fb..4ad4cec62 100644 --- a/openml/tasks/task.py +++ b/openml/tasks/task.py @@ -101,7 +101,7 @@ def _entity_letter(cls) -> str: return "t" @property - def id(self) -> int | None: # noqa: A003 + def id(self) -> int | None: """Return the OpenML ID of this task.""" return self.task_id