Skip to content

Commit 6372255

Browse files
committed
wip
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 633bf74 commit 6372255

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cyclonedx/model/definition.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
from .bom_ref import BomRef
3030

3131
if TYPE_CHECKING: # pragma: no cover
32-
pass
32+
from typing import Type, TypeVar
33+
34+
_T_CreId = TypeVar('_T_CreId', bound='CreId')
3335

3436

3537
@serializable.serializable_class
@@ -63,7 +65,7 @@ def serialize(cls, o: Any) -> str:
6365
f'Attempt to serialize a non-CreId: {o!r}')
6466

6567
@classmethod
66-
def deserialize(cls, o: Any) -> 'CreId':
68+
def deserialize(cls: 'Type[_T_CreId]', o: Any) -> '_T_CreId':
6769
return cls(id=str(o))
6870

6971
def __eq__(self, other: Any) -> bool:

0 commit comments

Comments
 (0)