Skip to content

Commit

Permalink
refactor: allow using StreamManager(address) instead of address=...
Browse files Browse the repository at this point in the history
  • Loading branch information
fubuloubu committed Sep 20, 2024
1 parent 45dbab5 commit 325385c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sdk/py/apepay/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
class StreamManager(BaseInterfaceModel):
address: AddressType

def __init__(self, address, /, *args, **kwargs):
kwargs["address"] = address
super().__init__(*args, **kwargs)

@field_validator("address", mode="before")
def normalize_address(cls, value: Any) -> AddressType:
return cls.conversion_manager.convert(value, AddressType)
Expand Down

0 comments on commit 325385c

Please sign in to comment.