Skip to content

Commit

Permalink
docstrings for serialised TypedDicts #148
Browse files Browse the repository at this point in the history
  • Loading branch information
jacanchaplais committed Sep 4, 2023
1 parent 251dbaf commit 4c0e838
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions graphicle/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1976,6 +1976,13 @@ def _composite_copy(instance: CompositeGeneric) -> CompositeGeneric:


class ParticleSetSerialized(tyx.TypedDict, total=False):
"""Typed dictionary format of a serialized ParticleSet instance.
.. versionadded:: 0.3.2
:group: datastructure
"""

pdg: ty.List[int]
pmu: ty.List[ty.Tuple[float, float, float, float]]
color: ty.List[ty.Tuple[int, int]]
Expand Down Expand Up @@ -2371,6 +2378,13 @@ def serialize(self) -> ty.Tuple[VertexPair, ...]:


class GraphicleSerialized(tyx.TypedDict, total=False):
"""Typed dictionary format of a serialized Graphicle instance.
.. versionadded:: 0.3.2
:group: datastructure
"""

pdg: ty.List[int]
pmu: ty.List[ty.Tuple[float, float, float, float]]
color: ty.List[ty.Tuple[int, int]]
Expand Down

0 comments on commit 4c0e838

Please sign in to comment.