fix pylint R1714 (consider-using-in)

This commit is contained in:
Pavol Rusnak 2023-01-21 12:11:45 +00:00
parent 35396d7e63
commit 906d91bcf1
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -560,10 +560,10 @@ async def api_lnurlscan(code: str, wallet: WalletTypeInfo = Depends(get_key_type
for [k, v] in metadata:
if k == "text/plain":
params.update(description=v)
if k == "image/jpeg;base64" or k == "image/png;base64":
if k in ("image/jpeg;base64", "image/png;base64"):
data_uri = "data:" + k + "," + v
params.update(image=data_uri)
if k == "text/email" or k == "text/identifier":
if k in ("text/email", "text/identifier"):
params.update(targetUser=v)
params.update(commentAllowed=data.get("commentAllowed", 0))