Skip to content

Commit

Permalink
Set exclude_none=True for deprecated dict/json methods (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
manzt authored Nov 12, 2024
1 parent 7d35024 commit 3e9c7e3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/higlass_schema/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ class BaseModel(PydanticBaseModel):
def __rich_repr__(self):
return iter(self)

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

def dict(self, exclude_none: bool = True, **kwargs):
return super().dict(exclude_none=exclude_none, **kwargs)

def model_dump(self, exclude_none: bool = True, **kwargs):
return super().model_dump(exclude_none=exclude_none, **kwargs)

Expand Down

0 comments on commit 3e9c7e3

Please sign in to comment.