mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-17 15:13:24 +02:00
ruff: enable PIE lint
this just removes needless pass or ...
This commit is contained in:
@@ -20,7 +20,6 @@ class OAuthAccount(SQLAlchemyBaseOAuthAccountTableUUID, Base):
|
||||
refresh_token: Mapped[Optional[str]] = mapped_column(
|
||||
String(length=4096), nullable=True
|
||||
)
|
||||
pass
|
||||
|
||||
|
||||
class User(SQLAlchemyBaseUserTableUUID, Base):
|
||||
|
||||
@@ -204,7 +204,6 @@ class MovieService:
|
||||
:param metadata_provider: The metadata provider.
|
||||
:return: True if the movie exists, False otherwise.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def check_if_movie_exists(self, *, movie_id: MovieId) -> bool:
|
||||
@@ -214,7 +213,6 @@ class MovieService:
|
||||
:param movie_id: The ID of the movie.
|
||||
:return: True if the movie exists, False otherwise.
|
||||
"""
|
||||
...
|
||||
|
||||
def check_if_movie_exists(
|
||||
self,
|
||||
@@ -232,6 +230,7 @@ class MovieService:
|
||||
:return: True if the movie exists, False otherwise.
|
||||
:raises ValueError: If neither external ID and metadata provider nor movie ID are provided.
|
||||
"""
|
||||
|
||||
if not (external_id is None or metadata_provider is None):
|
||||
try:
|
||||
self.movie_repository.get_movie_by_external_id(
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import abc
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
from media_manager.notification.schemas import MessageNotification
|
||||
|
||||
|
||||
class AbstractNotificationServiceProvider(abc.ABC):
|
||||
@abc.abstractmethod
|
||||
class AbstractNotificationServiceProvider(ABC):
|
||||
@abstractmethod
|
||||
def send_notification(self, message: MessageNotification) -> bool:
|
||||
"""
|
||||
Sends a notification with the given message.
|
||||
@@ -12,4 +12,3 @@ class AbstractNotificationServiceProvider(abc.ABC):
|
||||
:param message: The message to send in the notification.
|
||||
:return: True if the notification was sent successfully, False otherwise.
|
||||
"""
|
||||
pass
|
||||
|
||||
@@ -23,7 +23,6 @@ class AbstractDownloadClient(ABC):
|
||||
:param torrent: The indexer query result of the torrent file to download.
|
||||
:return: The torrent object with calculated hash and initial status.
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def remove_torrent(self, torrent: Torrent, delete_data: bool = False) -> None:
|
||||
@@ -33,7 +32,6 @@ class AbstractDownloadClient(ABC):
|
||||
:param torrent: The torrent to remove.
|
||||
:param delete_data: Whether to delete the downloaded data.
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def get_torrent_status(self, torrent: Torrent) -> TorrentStatus:
|
||||
@@ -43,7 +41,6 @@ class AbstractDownloadClient(ABC):
|
||||
:param torrent: The torrent to get the status of.
|
||||
:return: The status of the torrent.
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def pause_torrent(self, torrent: Torrent) -> None:
|
||||
@@ -52,7 +49,6 @@ class AbstractDownloadClient(ABC):
|
||||
|
||||
:param torrent: The torrent to pause.
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def resume_torrent(self, torrent: Torrent) -> None:
|
||||
@@ -61,4 +57,3 @@ class AbstractDownloadClient(ABC):
|
||||
|
||||
:param torrent: The torrent to resume.
|
||||
"""
|
||||
pass
|
||||
|
||||
@@ -76,7 +76,6 @@ class SeasonRequestBase(BaseModel):
|
||||
|
||||
class CreateSeasonRequest(SeasonRequestBase):
|
||||
season_id: SeasonId
|
||||
pass
|
||||
|
||||
|
||||
class UpdateSeasonRequest(SeasonRequestBase):
|
||||
|
||||
@@ -207,7 +207,6 @@ class TvService:
|
||||
:param metadata_provider: The metadata provider.
|
||||
:return: True if the show exists, False otherwise.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def check_if_show_exists(self, *, show_id: ShowId) -> bool:
|
||||
@@ -217,7 +216,6 @@ class TvService:
|
||||
:param show_id: The ID of the show.
|
||||
:return: True if the show exists, False otherwise.
|
||||
"""
|
||||
...
|
||||
|
||||
def check_if_show_exists(
|
||||
self, *, external_id=None, metadata_provider=None, show_id=None
|
||||
|
||||
Reference in New Issue
Block a user