Skip to content

Commit

Permalink
feat(model): Make Accessor typevars covariant
Browse files Browse the repository at this point in the history
  • Loading branch information
Wuestengecko committed Aug 20, 2024
1 parent 3dce2db commit 0719f25
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 65 deletions.
3 changes: 3 additions & 0 deletions capellambse/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"""TypeVar for ":py:class:`str` | None"."""
T = t.TypeVar("T", bound="ModelObject")
"""TypeVar for ":py:class:`capellambse.model.ModelObject`"."""
T_co = t.TypeVar("T_co", bound="ModelObject", covariant=True)
"""Covariant TypeVar for ":py:class:`capellambse.model.ModelObject`"."""
U = t.TypeVar("U")
"""TypeVar (unbound)."""

Expand Down Expand Up @@ -113,6 +115,7 @@ def __hash__(self):
"E",
"S",
"T",
"T_co",
"U",
"attr_equal",
"diagram",
Expand Down
Loading

0 comments on commit 0719f25

Please sign in to comment.