diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fa147388..a079ea02 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: hooks: - id: yamllint - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.11 + rev: v0.1.12 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/wlc/__init__.py b/wlc/__init__.py index 3a6bf0e5..b3a59228 100644 --- a/wlc/__init__.py +++ b/wlc/__init__.py @@ -570,7 +570,7 @@ class Project(LazyObject, RepoObjectMixin): ID: ClassVar[str] = "slug" MAPPINGS: ClassVar[Dict[str, Any]] = {"source_language": Language} - def list(self): # noqa: A003 + def list(self): """List components in the project.""" self.ensure_loaded("components_list_url") return self.weblate.list_components(self._attribs["components_list_url"]) @@ -646,7 +646,7 @@ class Component(LazyObject, RepoObjectMixin): } REPOSITORY_CLASS = Repository - def list(self): # noqa: A003 + def list(self): """List translations in the component.""" self.ensure_loaded("translations_url") return self.weblate.list_translations(self._attribs["translations_url"]) @@ -745,7 +745,7 @@ class Translation(LazyObject, RepoObjectMixin): MAPPINGS: ClassVar[Dict[str, Any]] = {"language": Language, "component": Component} REPOSITORY_CLASS = Repository - def list(self): # noqa: A003 + def list(self): """API compatibility method, returns self.""" self.ensure_loaded("last_author") return self @@ -867,7 +867,7 @@ class Unit(LazyObject): ID: ClassVar[str] = "id" MAPPINGS: ClassVar[Dict[str, Any]] = {"translation": Translation} - def list(self): # noqa: A003 + def list(self): """API compatibility method, returns self.""" self.ensure_loaded("id") return self diff --git a/wlc/main.py b/wlc/main.py index 09eb4685..bd9a851f 100644 --- a/wlc/main.py +++ b/wlc/main.py @@ -205,7 +205,7 @@ def print_text(self, value, header): for key, data in sorted_items(value): self.println(f"{key}: {self.format_value(data)}") - def print(self, value): # noqa: A003 + def print(self, value): """Print value.""" header = None if isinstance(value, list):