Skip to content

Commit

Permalink
build method always must produce json-like dicts
Browse files Browse the repository at this point in the history
  • Loading branch information
imryche committed Oct 29, 2021
1 parent 8c3fe2b commit d06d136
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion blockkit/components.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import json
from typing import TYPE_CHECKING, Any, List, Type, Union

from pydantic import BaseModel
Expand Down Expand Up @@ -44,4 +45,4 @@ def _expand_str(
return value

def build(self) -> dict:
return self.dict(by_alias=True, exclude_none=True)
return json.loads(self.json(by_alias=True, exclude_none=True))
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
EMAIL = "[email protected]"
AUTHOR = "Dmitry Chernyshov"
REQUIRES_PYTHON = ">=3.6.0"
VERSION = "1.3.3"
VERSION = "1.3.4"

REQUIRED = ["pydantic", "black"]
EXTRAS = {}
Expand Down

0 comments on commit d06d136

Please sign in to comment.