Skip to content

Commit b13c592

Browse files
authored
Merge pull request #577 from yukinarit/fix-type-check-disabled
type_check=disable should not implement beartype
2 parents be355af + 4148d63 commit b13c592

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

serde/de.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def wrap(cls: type[T]) -> type[T]:
274274
for typ in iter_types(cls):
275275
# When we encounter a dataclass not marked with deserialize, then also generate
276276
# deserialize functions for it.
277-
if is_dataclass_without_de(typ):
277+
if is_dataclass_without_de(typ) and typ is not cls:
278278
# We call deserialize and not wrap to make sure that we will use the default serde
279279
# configuration for generating the deserialization function.
280280
deserialize(typ)

serde/se.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def wrap(cls: type[T]) -> type[T]:
244244
for typ in iter_types(cls):
245245
# When we encounter a dataclass not marked with serialize, then also generate serialize
246246
# functions for it.
247-
if is_dataclass_without_se(typ):
247+
if is_dataclass_without_se(typ) and typ is not cls:
248248
# We call serialize and not wrap to make sure that we will use the default serde
249249
# configuration for generating the serialization function.
250250
serialize(typ)

0 commit comments

Comments
 (0)