fix: Lint fixes of core, models and schemas
All checks were successful
Backend CI / test (push) Successful in 4m5s
All checks were successful
Backend CI / test (push) Successful in 4m5s
This commit is contained in:
@@ -28,25 +28,16 @@ from .playlist import (
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
# Auth schemas
|
||||
"ApiTokenRequest",
|
||||
"ApiTokenResponse",
|
||||
"ApiTokenStatusResponse",
|
||||
"AuthResponse",
|
||||
"TokenResponse",
|
||||
"UserLoginRequest",
|
||||
"UserRegisterRequest",
|
||||
"UserResponse",
|
||||
# Common schemas
|
||||
"HealthResponse",
|
||||
"MessageResponse",
|
||||
"StatusResponse",
|
||||
# Player schemas
|
||||
"PlayerModeRequest",
|
||||
"PlayerSeekRequest",
|
||||
"PlayerStateResponse",
|
||||
"PlayerVolumeRequest",
|
||||
# Playlist schemas
|
||||
"PlaylistAddSoundRequest",
|
||||
"PlaylistCreateRequest",
|
||||
"PlaylistReorderRequest",
|
||||
@@ -54,4 +45,9 @@ __all__ = [
|
||||
"PlaylistSoundResponse",
|
||||
"PlaylistStatsResponse",
|
||||
"PlaylistUpdateRequest",
|
||||
"StatusResponse",
|
||||
"TokenResponse",
|
||||
"UserLoginRequest",
|
||||
"UserRegisterRequest",
|
||||
"UserResponse",
|
||||
]
|
||||
|
||||
@@ -40,7 +40,8 @@ class PlaylistResponse(BaseModel):
|
||||
def from_playlist(cls, playlist: Playlist) -> "PlaylistResponse":
|
||||
"""Create response from playlist model."""
|
||||
if playlist.id is None:
|
||||
raise ValueError("Playlist ID cannot be None")
|
||||
msg = "Playlist ID cannot be None"
|
||||
raise ValueError(msg)
|
||||
return cls(
|
||||
id=playlist.id,
|
||||
name=playlist.name,
|
||||
@@ -70,7 +71,8 @@ class PlaylistSoundResponse(BaseModel):
|
||||
def from_sound(cls, sound: Sound) -> "PlaylistSoundResponse":
|
||||
"""Create response from sound model."""
|
||||
if sound.id is None:
|
||||
raise ValueError("Sound ID cannot be None")
|
||||
msg = "Sound ID cannot be None"
|
||||
raise ValueError(msg)
|
||||
return cls(
|
||||
id=sound.id,
|
||||
name=sound.name,
|
||||
|
||||
Reference in New Issue
Block a user