ruff: enable PIE lint

this just removes needless pass or ...
This commit is contained in:
Marcel Hellwig
2026-01-05 13:14:47 +01:00
parent f2141ca8b8
commit acd883df21
7 changed files with 6 additions and 17 deletions

View File

@@ -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):

View File

@@ -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(

View File

@@ -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

View File

@@ -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

View File

@@ -76,7 +76,6 @@ class SeasonRequestBase(BaseModel):
class CreateSeasonRequest(SeasonRequestBase):
season_id: SeasonId
pass
class UpdateSeasonRequest(SeasonRequestBase):

View File

@@ -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

View File

@@ -5,7 +5,7 @@ line-ending = "lf"
quote-style = "double"
[lint]
# to be enabled: ANN, BLE, C90, CPY, D, DOC, DTZ, FBT, G, PIE, PL, PTH, RET, RSE, SLF, SIM, TC, TRY, UP
# to be enabled: ANN, BLE, C90, CPY, D, DOC, DTZ, FBT, G, PL, PTH, RET, RSE, SLF, SIM, TC, TRY, UP
extend-select = [
"A", "ARG", "ASYNC",
"B",
@@ -16,7 +16,7 @@ extend-select = [
"I", "ICN", "INP", "INT", "ISC",
"LOG",
"N",
"PERF", "PGH", "PT", "PYI",
"PERF", "PGH", "PIE", "PT", "PYI",
"Q",
"RUF",
"S", "SLOT",