Skip to content

Commit 2450559

Browse files
committed
fix: type check errors
1 parent ecadf07 commit 2450559

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/webapp/main.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ async def access_token_from_api_key(
116116
minutes=int(cast(str, env_vars["ACCESS_TOKEN_EXPIRE_MINUTES"]))
117117
)
118118
access_token = create_access_token(
119-
data={"sub": user.email}, expires_delta=access_token_expires
119+
data={"sub": user.email}, expires_delta=access_token_expires # type: ignore
120120
)
121121
return Token(access_token=access_token, token_type="bearer")
122122

@@ -125,7 +125,7 @@ async def access_token_from_api_key(
125125
async def read_cross_inst_users(
126126
current_user: Annotated[BaseUser, Depends(get_current_active_user)],
127127
sql_session: Annotated[Session, Depends(get_session)],
128-
):
128+
) -> Any:
129129
"""Get users that don't have institution specifications.
130130
(datakinders or people who haven't set their institution yet)."""
131131
if not current_user.is_datakinder():
@@ -143,7 +143,7 @@ async def read_cross_inst_users(
143143
)
144144
.all()
145145
)
146-
res = []
146+
res: list = []
147147
if not query_result or len(query_result) == 0:
148148
return res
149149

@@ -189,7 +189,7 @@ async def set_datakinders(
189189
.all()
190190
)
191191

192-
res = []
192+
res: list = []
193193
if not query_result:
194194
return res
195195
for elem in query_result:
@@ -254,7 +254,7 @@ async def generate_api_key(
254254
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
255255
detail="Database write of the API key duplicate entries.",
256256
)
257-
return {
257+
return { # type: ignore
258258
"access_type": query_result[0][0].access_type,
259259
"key": generated_key_value,
260260
"inst_id": (

0 commit comments

Comments
 (0)