Fixed all ruff issues
This commit is contained in:
@@ -282,7 +282,7 @@ class QBittorrentClient:
|
||||
}
|
||||
|
||||
try:
|
||||
response = self._make_request("POST", "/api/v2/torrents/delete", data=data)
|
||||
self._make_request("POST", "/api/v2/torrents/delete", data=data)
|
||||
logger.info(f"Deleted torrent {torrent_hash}")
|
||||
return True
|
||||
|
||||
|
||||
@@ -194,7 +194,6 @@ class TMDBClient:
|
||||
if "id" not in top_result or "media_type" not in top_result:
|
||||
raise TMDBAPIError("Invalid TMDB response structure")
|
||||
|
||||
tmdb_id = top_result["id"]
|
||||
media_type = top_result["media_type"]
|
||||
|
||||
# Skip if not movie or TV show
|
||||
|
||||
@@ -84,7 +84,9 @@ class FileManager:
|
||||
logger.error(f"Unexpected error setting path: {e}", exc_info=True)
|
||||
return {"error": "internal_error", "message": "Failed to set path"}
|
||||
|
||||
def list_folder(self, folder_type: str, path: str = ".") -> dict[str, Any]:
|
||||
def list_folder( # noqa: PLR0911
|
||||
self, folder_type: str, path: str = "."
|
||||
) -> dict[str, Any]:
|
||||
"""
|
||||
List contents of a configured folder.
|
||||
|
||||
@@ -165,7 +167,9 @@ class FileManager:
|
||||
logger.error(f"Unexpected error listing folder: {e}", exc_info=True)
|
||||
return {"error": "internal_error", "message": "Failed to list folder"}
|
||||
|
||||
def move_file(self, source: str, destination: str) -> dict[str, Any]:
|
||||
def move_file( # noqa: PLR0911
|
||||
self, source: str, destination: str
|
||||
) -> dict[str, Any]:
|
||||
"""
|
||||
Move a file from one location to another.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user