Skip to content

Commit

Permalink
Pre-commit: Fix mypy warning in aiida.orm.utils.serialize
Browse files Browse the repository at this point in the history
  • Loading branch information
sphuber committed May 22, 2023
1 parent 513830b commit c259224
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aiida/orm/utils/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ def serialize(data: Any, encoding: str | None = None) -> str | bytes:
:param encoding: optional encoding for the serialized string
:return: string representation of the serialized data structure or byte array if specific encoding is specified
"""
serialized: bytes | str

if encoding is not None:
serialized = yaml.dump(data, encoding=encoding, Dumper=AiiDADumper)
else:
Expand Down

0 comments on commit c259224

Please sign in to comment.