fixup types
This commit is contained in:
parent
9cecd42467
commit
a7c10dde4a
2
.github/workflows/mypy.yml
vendored
2
.github/workflows/mypy.yml
vendored
|
@ -10,4 +10,4 @@ jobs:
|
|||
- uses: jpetrucciani/mypy-check@master
|
||||
with:
|
||||
mypy_flags: '--install-types --non-interactive'
|
||||
path: lnbits
|
||||
path: 'lnbits'
|
||||
|
|
|
@ -55,9 +55,9 @@ async def home(request: Request, lightning: str = None):
|
|||
)
|
||||
async def extensions(
|
||||
request: Request,
|
||||
user=Depends(check_user_exists),
|
||||
enable=Query(None),
|
||||
disable=Query(None),
|
||||
user: User = Depends(check_user_exists), #type: ignore
|
||||
enable: str = Query(None), #type: ignore
|
||||
disable: str = Query(None), #type: ignore
|
||||
):
|
||||
extension_to_enable = enable
|
||||
extension_to_disable = disable
|
||||
|
@ -108,11 +108,12 @@ just **user_id**: return the first user wallet or create one if none found (with
|
|||
nothing: create everything<br>
|
||||
""",
|
||||
)
|
||||
|
||||
async def wallet(
|
||||
request=Query(None),
|
||||
nme=Query(None),
|
||||
usr=Query(None),
|
||||
wal=Query(None),
|
||||
nme: Optional[str] = Query(None), #type: ignore
|
||||
usr: Optional[UUID4] = Query(None), #type: ignore
|
||||
wal: Optional[UUID4] = Query(None), #type: ignore
|
||||
):
|
||||
user_id = usr.hex if usr else None
|
||||
wallet_id = wal.hex if wal else None
|
||||
|
|
|
@ -122,8 +122,8 @@ api_key_query = APIKeyQuery(
|
|||
|
||||
async def get_key_type(
|
||||
r: Request,
|
||||
api_key_header=Security(api_key_header),
|
||||
api_key_query=Security(api_key_query),
|
||||
api_key_header: str = Security(api_key_header), #type: ignore
|
||||
api_key_query: str = Security(api_key_query) #type: ignore
|
||||
) -> WalletTypeInfo:
|
||||
# 0: admin
|
||||
# 1: invoice
|
||||
|
@ -180,8 +180,8 @@ async def get_key_type(
|
|||
|
||||
async def require_admin_key(
|
||||
r: Request,
|
||||
api_key_header=Security(api_key_header),
|
||||
api_key_query=Security(api_key_query),
|
||||
api_key_header: str = Security(api_key_header), #type: ignore
|
||||
api_key_query: str = Security(api_key_query) #type: ignore
|
||||
):
|
||||
token = api_key_header if api_key_header else api_key_query
|
||||
|
||||
|
@ -199,8 +199,8 @@ async def require_admin_key(
|
|||
|
||||
async def require_invoice_key(
|
||||
r: Request,
|
||||
api_key_header=Security(api_key_header),
|
||||
api_key_query=Security(api_key_query),
|
||||
api_key_header: str = Security(api_key_header), #type: ignore
|
||||
api_key_query: str = Security(api_key_query) #type: ignore
|
||||
):
|
||||
token = api_key_header if api_key_header else api_key_query
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user