Skip to content

Commit

Permalink
mypy: update types
Browse files Browse the repository at this point in the history
  • Loading branch information
purarue committed Oct 28, 2024
1 parent 5503cb8 commit e8acd9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion google_takeout_parser/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def shared_options(func: Callable[..., None]) -> Callable[..., None]:
def _serialize_default(obj: Any) -> Any:
if isinstance(obj, Exception):
return {"type": type(obj).__name__, "value": str(obj)}
elif dataclasses.is_dataclass(obj):
elif dataclasses.is_dataclass(obj) and not isinstance(obj, type):
d = dataclasses.asdict(obj) # type: ignore[call-overload] # see https://github.com/python/mypy/issues/17550
assert "type" not in d
d["type"] = type(obj).__name__
Expand Down

0 comments on commit e8acd9d

Please sign in to comment.