Use basedpyright refactor
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Annotated, Optional
|
||||
from typing import Annotated
|
||||
|
||||
from fastapi import Cookie, Form, Request
|
||||
from folkugat_web.api import router
|
||||
@@ -8,13 +8,13 @@ from folkugat_web.services import auth as service
|
||||
|
||||
|
||||
@router.get("/api/nota")
|
||||
def nota_input(request: Request, value: Optional[str] = None):
|
||||
def nota_input(request: Request, value: str | None = None):
|
||||
return nota.input(request, value)
|
||||
|
||||
|
||||
@router.post("/api/nota")
|
||||
def login(request: Request, value: Annotated[Optional[str], Form()] = None,
|
||||
nota_folkugat: Annotated[Optional[str], Cookie()] = None):
|
||||
def login(request: Request, value: Annotated[str | None, Form()] = None,
|
||||
nota_folkugat: Annotated[str | None, Cookie()] = None):
|
||||
logged_in = service.logged_in(nota_folkugat)
|
||||
new_login = service.login(value)
|
||||
if new_login and not logged_in:
|
||||
|
||||
Reference in New Issue
Block a user