Coverage for bioimageio/spec/_internal/license_id.py: 100%

10 statements  

« prev     ^ index     » next       coverage.py v7.8.0, created at 2025-04-02 14:21 +0000

1from typing import Any, ClassVar, Type 

2 

3from pydantic import RootModel 

4 

5from ._generated_spdx_license_literals import ( 

6 DeprecatedLicenseId as DeprecatedLicenseIdLiteral, 

7) 

8from ._generated_spdx_license_literals import LicenseId as LicenseIdLiteral 

9from .validated_string import ValidatedString 

10 

11__all__ = [ 

12 "DeprecatedLicenseId", 

13 "DeprecatedLicenseIdLiteral", 

14 "LicenseId", 

15 "LicenseIdLiteral", 

16] 

17 

18 

19class LicenseId(ValidatedString): 

20 root_model: ClassVar[Type[RootModel[Any]]] = RootModel[LicenseIdLiteral] 

21 

22 

23class DeprecatedLicenseId(ValidatedString): 

24 root_model: ClassVar[Type[RootModel[Any]]] = RootModel[DeprecatedLicenseIdLiteral]