Skip to content

Commit

Permalink
Add back dict/json methods with defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
manzt committed Nov 11, 2024
1 parent 3682b82 commit 54ac6b2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/higlass_schema/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,16 @@ class BaseModel(PydanticBaseModel):
def __rich_repr__(self):
return iter(self)

def model_dump(self, exclude_none: bool = True, **kwargs):
def dict(self, exclude_none: bool = True, **kwargs) -> Dict[str, Any]:
return super().dict(exclude_none=exclude_none, **kwargs)

def json(self, exclude_none: bool = True, **kwargs) -> str:
return super().json(exclude_none=exclude_none, **kwargs)

def model_dump(self, exclude_none: bool = True, **kwargs) -> Dict[str, Any]:
return super().model_dump(exclude_none=exclude_none, **kwargs)

def model_dump_json(self, exclude_none: bool = True, **kwargs):
def model_dump_json(self, exclude_none: bool = True, **kwargs) -> str:
return super().model_dump_json(exclude_none=exclude_none, **kwargs)


Expand Down

0 comments on commit 54ac6b2

Please sign in to comment.