refactor: improve code formatting and organization across multiple files
This commit is contained in:
@@ -43,7 +43,9 @@ def to_public_user(user: UserInDB) -> UserPublic:
|
||||
return UserPublic(username=user.username, full_name=user.full_name)
|
||||
|
||||
|
||||
def register_user(username: str, password: str, full_name: Optional[str] = None) -> UserInDB:
|
||||
def register_user(
|
||||
username: str, password: str, full_name: Optional[str] = None
|
||||
) -> UserInDB:
|
||||
normalized_username = username.strip()
|
||||
if not normalized_username:
|
||||
raise ValueError("Username must not be empty")
|
||||
|
||||
@@ -6,13 +6,14 @@ from typing import Iterable, cast
|
||||
|
||||
from geoalchemy2.elements import WKBElement, WKTElement
|
||||
from geoalchemy2.shape import to_shape
|
||||
|
||||
try: # pragma: no cover - optional dependency guard
|
||||
from shapely.geometry import Point # type: ignore
|
||||
except ImportError: # pragma: no cover - allow running without shapely at import time
|
||||
Point = None # type: ignore[assignment]
|
||||
|
||||
from sqlalchemy.orm import Session
|
||||
from sqlalchemy.exc import SQLAlchemyError
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from backend.app.models import StationModel, TrackModel, TrainModel
|
||||
from backend.app.repositories import StationRepository, TrackRepository, TrainRepository
|
||||
|
||||
Reference in New Issue
Block a user