Skip to content

Commit

Permalink
Merge pull request #577 from yukinarit/fix-type-check-disabled
Browse files Browse the repository at this point in the history
type_check=disable should not implement beartype
  • Loading branch information
yukinarit committed Jul 28, 2024
2 parents be355af + 4148d63 commit b13c592
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion serde/de.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def wrap(cls: type[T]) -> type[T]:
for typ in iter_types(cls):
# When we encounter a dataclass not marked with deserialize, then also generate
# deserialize functions for it.
if is_dataclass_without_de(typ):
if is_dataclass_without_de(typ) and typ is not cls:
# We call deserialize and not wrap to make sure that we will use the default serde
# configuration for generating the deserialization function.
deserialize(typ)
Expand Down
2 changes: 1 addition & 1 deletion serde/se.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def wrap(cls: type[T]) -> type[T]:
for typ in iter_types(cls):
# When we encounter a dataclass not marked with serialize, then also generate serialize
# functions for it.
if is_dataclass_without_se(typ):
if is_dataclass_without_se(typ) and typ is not cls:
# We call serialize and not wrap to make sure that we will use the default serde
# configuration for generating the serialization function.
serialize(typ)
Expand Down

0 comments on commit b13c592

Please sign in to comment.