feat: improve codequality and CI (#25)

* feat: improve codequality and CI
This commit is contained in:
dni ⚡ 2024-08-30 13:20:23 +02:00 committed by GitHub
parent 28121184c3
commit cc6752003a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 3114 additions and 292 deletions

View file

@ -8,26 +8,26 @@ class BuyOrder(BaseModel):
action: str
relay_id: str
pubkey: str
units_to_buy = 0
units_to_buy: int = 0
def is_valid_action(self):
def is_valid_action(self) -> bool:
return self.action in ["join", "storage"]
class NostrPartialAccount(BaseModel):
relay_id: str
pubkey: str
allowed: Optional[bool]
blocked: Optional[bool]
allowed: Optional[bool] = None
blocked: Optional[bool] = None
class NostrAccount(BaseModel):
pubkey: str
allowed = False
blocked = False
sats = 0
storage = 0
paid_to_join = False
sats: int = 0
storage: int = 0
paid_to_join: bool = False
allowed: bool = False
blocked: bool = False
@property
def can_join(self):