fix: lint

This commit is contained in:
Vlad Stan
2024-10-10 09:08:49 +02:00
committed by dni ⚡
parent 3cfbae3b28
commit 620325b399
+2 -3
View File
@@ -3,7 +3,6 @@ from __future__ import annotations
import hashlib import hashlib
import hmac import hmac
import json import json
import time
from dataclasses import dataclass from dataclasses import dataclass
from datetime import datetime, timezone from datetime import datetime, timezone
from enum import Enum from enum import Enum
@@ -34,7 +33,7 @@ def json_custom_serialization(_, o):
raise TypeError(f"Object is not JSON serializable: {o}") raise TypeError(f"Object is not JSON serializable: {o}")
json.JSONEncoder.default = json_custom_serialization json.JSONEncoder.default = json_custom_serialization # type: ignore[method-assign]
class BaseWallet(BaseModel): class BaseWallet(BaseModel):
@@ -333,7 +332,7 @@ class Payment(BaseModel):
@property @property
def is_expired(self) -> bool: def is_expired(self) -> bool:
return self.expiry < time.time() if self.expiry else False return self.expiry < datetime.now(timezone.utc) if self.expiry else False
@property @property
def is_internal(self) -> bool: def is_internal(self) -> bool: