Refactor scheduled task repository and schemas for improved type hints and consistency
- Updated type hints from List/Optional to list/None for better readability and consistency across the codebase. - Refactored import statements for better organization and clarity. - Enhanced the ScheduledTaskBase schema to use modern type hints. - Cleaned up unnecessary comments and whitespace in various files. - Improved error handling and logging in task execution handlers. - Updated test cases to reflect changes in type hints and ensure compatibility with the new structure.
This commit is contained in:
@@ -351,11 +351,11 @@ async def admin_cookies(admin_user: User) -> dict[str, str]:
|
||||
|
||||
@pytest.fixture
|
||||
def test_user_id(test_user: User):
|
||||
"""Get test user ID."""
|
||||
"""Get test user ID."""
|
||||
return test_user.id
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@pytest.fixture
|
||||
def test_sound_id():
|
||||
"""Create a test sound ID."""
|
||||
import uuid
|
||||
@@ -364,7 +364,7 @@ def test_sound_id():
|
||||
|
||||
@pytest.fixture
|
||||
def test_playlist_id():
|
||||
"""Create a test playlist ID."""
|
||||
"""Create a test playlist ID."""
|
||||
import uuid
|
||||
return uuid.uuid4()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user