🎨 Format files with pre-commit and Ruff (#611)
This commit is contained in:

committed by
GitHub

parent
2802a4df9e
commit
0cc802eec8
@@ -1,14 +1,12 @@
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel, EmailStr
|
||||
|
||||
|
||||
# Shared properties
|
||||
class UserBase(BaseModel):
|
||||
email: Optional[EmailStr] = None
|
||||
is_active: Optional[bool] = True
|
||||
email: EmailStr | None = None
|
||||
is_active: bool | None = True
|
||||
is_superuser: bool = False
|
||||
full_name: Optional[str] = None
|
||||
full_name: str | None = None
|
||||
|
||||
|
||||
# Properties to receive via API on creation
|
||||
@@ -19,11 +17,11 @@ class UserCreate(UserBase):
|
||||
|
||||
# Properties to receive via API on update
|
||||
class UserUpdate(UserBase):
|
||||
password: Optional[str] = None
|
||||
password: str | None = None
|
||||
|
||||
|
||||
class UserInDBBase(UserBase):
|
||||
id: Optional[int] = None
|
||||
id: int | None = None
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
Reference in New Issue
Block a user