fix(aurora): typehints
This commit is contained in:
parent
60d4afc6f3
commit
87942213a5
1 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ class AuroraBaseModel(BaseModel):
|
|||
def dump(self) -> dict:
|
||||
return self.model_dump(exclude={"bot"})
|
||||
|
||||
def to_json(self, indent: int | None = None, file: Any | None = None, **kwargs):
|
||||
def to_json(self, indent: int | None = None, file: Any | None = None, **kwargs) -> str:
|
||||
from ..utilities.json import dump, dumps # pylint: disable=cyclic-import
|
||||
return dump(self.dump(), file, indent=indent, **kwargs) if file else dumps(self.dump(), indent=indent, **kwargs)
|
||||
|
||||
|
@ -26,6 +26,6 @@ class AuroraGuildModel(AuroraBaseModel):
|
|||
def dump(self) -> dict:
|
||||
return self.model_dump(exclude={"bot", "guild_id", "guild"})
|
||||
|
||||
def to_json(self, indent: int | None = None, file: Any | None = None, **kwargs):
|
||||
def to_json(self, indent: int | None = None, file: Any | None = None, **kwargs) -> str:
|
||||
from ..utilities.json import dump, dumps # pylint: disable=cyclic-import
|
||||
return dump(self.dump(), file, indent=indent, **kwargs) if file else dumps(self.dump(), indent=indent, **kwargs)
|
||||
|
|
Loading…
Reference in a new issue