File tree Expand file tree Collapse file tree 3 files changed +10
-11
lines changed Expand file tree Collapse file tree 3 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 88
99router = APIRouter ()
1010
11- async def get_overlays (session : AsyncSession = Depends (get_db )):
11+ async def get_overlays (session : AsyncSession = Depends (get_db )) -> list :
1212 result = await session .execute (select (Overlay ))
1313 overlays = result .scalars ().all ()
1414 return [OverlayCreate (riotId = overlay .riotId , hdevApiKey = overlay .hdevApiKey , uuid = overlay .uuid ) for overlay in overlays ]
Original file line number Diff line number Diff line change @@ -11,14 +11,13 @@ class OverlaySchema(BaseModel):
1111 tag : str
1212
1313 class Config :
14- orm_mode = True
14+ orm_mode : bool = True
1515
16- # Схема для создания записи
1716class OverlayCreate (OverlayBase ):
1817 pass
1918
2019class OverlayRead (OverlayBase ):
2120 uuid : uuid_pkg .UUID
2221
2322 class Config :
24- orm_mode = True
23+ orm_mode : bool = True
Original file line number Diff line number Diff line change 66def str_to_bool (value : str ) -> bool :
77 return value .lower () in ("true" , "1" , "yes" )
88
9- BASE_DIR = Path (__file__ ).resolve ().parent .parent .parent
9+ BASE_DIR : str = Path (__file__ ).resolve ().parent .parent .parent
1010
11- dotenv_file = BASE_DIR / '.env'
11+ dotenv_file : str = BASE_DIR / '.env'
1212if dotenv_file .is_file ():
1313 load_dotenv (dotenv_file )
1414else :
1515 raise ImportError ('⚠ .env was not found' )
1616
1717
18- DEBUG = str_to_bool (environ .get ("DEBUG" , "False" ))
18+ DEBUG : bool = str_to_bool (environ .get ("DEBUG" , "False" ))
1919
20- PROJECT_NAME = environ .get ('PROJECT_NAME' )
21- VERSION = environ .get ('VERSION' )
20+ PROJECT_NAME : str = environ .get ('PROJECT_NAME' )
21+ VERSION : str = environ .get ('VERSION' )
2222
23- DATABASE_URL = environ .get ('DATABASE_URL' )
24- DEGUB_DATABASE_URL = environ .get ('DEGUB_DATABASE_URL' )
23+ DATABASE_URL : str = environ .get ('DATABASE_URL' )
24+ DEGUB_DATABASE_URL : str = environ .get ('DEGUB_DATABASE_URL' )
You can’t perform that action at this time.
0 commit comments