🎨 Format files with pre-commit and Ruff (#611)

This commit is contained in:
Sebastián Ramírez
2024-02-25 19:39:33 +01:00
committed by GitHub
parent 2802a4df9e
commit 0cc802eec8
35 changed files with 156 additions and 163 deletions

View File

@@ -1,5 +1,3 @@
from typing import Optional
from sqlalchemy.orm import Session
from app import crud, models
@@ -8,7 +6,7 @@ from app.tests.utils.user import create_random_user
from app.tests.utils.utils import random_lower_string
def create_random_item(db: Session, *, owner_id: Optional[int] = None) -> models.Item:
def create_random_item(db: Session, *, owner_id: int | None = None) -> models.Item:
if owner_id is None:
user = create_random_user(db)
owner_id = user.id