diff --git a/cookbook.yaml b/cookbook.yaml index 380cb7c..badd5ce 100644 --- a/cookbook.yaml +++ b/cookbook.yaml @@ -27,7 +27,6 @@ format: requires: - install commands: - - black . - ruff check --fix-only . lint: @@ -35,7 +34,6 @@ lint: requires: - install commands: - - black --check . - p check --lockfile - ruff check . - mypy . diff --git a/pyproject.toml b/pyproject.toml index 4a12833..bfacffb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,6 @@ dev = [ "ipython~=8.18", ] lint = [ - "black~=24.10", "mypy~=1.13", "ruff~=0.8", "types-requests~=2.0", @@ -62,11 +61,6 @@ docs = [ "pymdown-extensions~=10.12", ] -[tool.black] -target-version = [ - "py39", -] - [tool.mypy] check_untyped_defs = true disallow_any_generics = true @@ -94,61 +88,14 @@ target-version = "py39" [tool.ruff.lint] select = [ - "A", - "ANN", - "ARG", - "ASYNC", - "B", - "BLE", - "C4", - "COM", - "DTZ", - "E", - "EM", - "ERA", - "EXE", - "F", - "FA", - "FBT", - "FIX", - "FLY", - "FURB", - "G", - "I", - "ICN", - "INP", - "ISC", - "LOG", - "N", - "PGH", - "PERF", - "PIE", - "PL", - "PT", - "PTH", - "PYI", - "Q", - "RET", - "RSE", - "RUF", - "S", - "SIM", - "SLF", - "SLOT", - "T10", - "TCH", - "TD", - "TID", - "TRY", - "UP", - "W", - "YTT", + "ALL", ] ignore = [ - "ANN101", - "ANN102", "ANN401", "COM812", + "D10", + "D203", + "D213", "E501", "FIX002", "PLR09", diff --git a/src/tvdb_api_client/client.py b/src/tvdb_api_client/client.py index 68b47b5..55829f4 100644 --- a/src/tvdb_api_client/client.py +++ b/src/tvdb_api_client/client.py @@ -93,7 +93,7 @@ def _get(self, url: URL) -> dict[str, Any]: def get_raw_series_by_id( self, tvdb_id: int, *, refresh_cache: bool = False ) -> dict[str, Any]: - """Get the series info by its tvdb ib as returned by the TVDB""" + """Get the series info by its tvdb ib as returned by the TVDB.""" key = f"get_series_by_id::tvdb_id:{tvdb_id}" data: dict[str, Any] | None = self._cache.get(key) if data is None or refresh_cache: @@ -109,7 +109,7 @@ def get_series_by_id(self, tvdb_id: int, *, refresh_cache: bool = False) -> Seri def get_raw_episodes_by_series( self, tvdb_id: int, season_type: str = "default", *, refresh_cache: bool = False ) -> list[dict[str, Any]]: - """Get all the episodes for a TV series as returned by the TVDB""" + """Get all the episodes for a TV series as returned by the TVDB.""" key = f"get_episodes_by_series::tvdb_id:{tvdb_id}" data: list[dict[str, Any]] | None = self._cache.get(key) if data is None or refresh_cache: @@ -122,7 +122,7 @@ def get_raw_episodes_by_series( def get_episodes_by_series( self, tvdb_id: int, season_type: str = "default", *, refresh_cache: bool = False ) -> list[Episode]: - """Get all the episodes for a TV series""" + """Get all the episodes for a TV series.""" raw_data = self.get_raw_episodes_by_series( tvdb_id, season_type, refresh_cache=refresh_cache )