Fix some ruff issues in code
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"""Movie domain value objects."""
|
||||
|
||||
import re
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
|
||||
@@ -66,8 +67,6 @@ class MovieTitle:
|
||||
|
||||
Removes special characters and replaces spaces with dots.
|
||||
"""
|
||||
import re
|
||||
|
||||
# Remove special characters except spaces, dots, and hyphens
|
||||
cleaned = re.sub(r"[^\w\s\.\-]", "", self.value)
|
||||
# Replace spaces with dots
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
"""TV Show domain entities."""
|
||||
|
||||
import re
|
||||
from dataclasses import dataclass, field
|
||||
from datetime import datetime
|
||||
|
||||
@@ -65,8 +66,6 @@ class TVShow:
|
||||
Format: "Title"
|
||||
Example: "Breaking.Bad"
|
||||
"""
|
||||
import re
|
||||
|
||||
# Remove special characters and replace spaces with dots
|
||||
cleaned = re.sub(r"[^\w\s\.\-]", "", self.title)
|
||||
return cleaned.replace(" ", ".")
|
||||
@@ -193,8 +192,6 @@ class Episode:
|
||||
episode_str = f"E{self.episode_number.value:02d}"
|
||||
|
||||
# Clean title for filename
|
||||
import re
|
||||
|
||||
clean_title = re.sub(r"[^\w\s\-]", "", self.title)
|
||||
clean_title = clean_title.replace(" ", ".")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user