Skip to content

Commit 4c097a8

Browse files
remove __str__ check in serializer
1 parent 3e43b62 commit 4c097a8

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

ads/cli.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,12 @@ def serialize(data):
7878
Returns:
7979
None
8080
Prints:
81-
The string representation of each dataclass object, or the string representation of any other type of object.
81+
The string representation of each dataclass object.
8282
"""
8383
if isinstance(data, list):
84-
[print(str(item) if hasattr(item, "__str__") else repr(item)) for item in data]
84+
[print(str(item)) for item in data]
8585
else:
86-
print(
87-
str(data)
88-
if (is_dataclass(data) and hasattr(data, "__str__"))
89-
else repr(data)
90-
)
86+
print(str(data))
9187

9288

9389
def cli():

0 commit comments

Comments
 (0)