We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 633bf74 commit 6372255Copy full SHA for 6372255
cyclonedx/model/definition.py
@@ -29,7 +29,9 @@
29
from .bom_ref import BomRef
30
31
if TYPE_CHECKING: # pragma: no cover
32
- pass
+ from typing import Type, TypeVar
33
+
34
+ _T_CreId = TypeVar('_T_CreId', bound='CreId')
35
36
37
@serializable.serializable_class
@@ -63,7 +65,7 @@ def serialize(cls, o: Any) -> str:
63
65
f'Attempt to serialize a non-CreId: {o!r}')
64
66
67
@classmethod
- def deserialize(cls, o: Any) -> 'CreId':
68
+ def deserialize(cls: 'Type[_T_CreId]', o: Any) -> '_T_CreId':
69
return cls(id=str(o))
70
71
def __eq__(self, other: Any) -> bool:
0 commit comments