formatting

This commit is contained in:
coletdjnz 2025-05-18 09:58:32 +12:00
parent 93f8ffdad0
commit e25a148568
No known key found for this signature in database
GPG Key ID: 91984263BB39894A

View File

@ -451,16 +451,10 @@ def validate_response(response: PoTokenResponse | None):
except ValueError:
return False
return (
response.expires_at is None
or (
isinstance(response.expires_at, int)
and (
response.expires_at <= 0
or response.expires_at > int(dt.datetime.now(dt.timezone.utc).timestamp())
)
)
)
if not isinstance(response.expires_at, int):
return response.expires_at is None
return response.expires_at <= 0 or response.expires_at > int(dt.datetime.now(dt.timezone.utc).timestamp())
def validate_cache_spec(spec: PoTokenCacheSpec):