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

11 statements  

« prev     ^ index     » next       coverage.py v7.15.4, created at 2026-08-18 09:17 +0000

1from __future__ import annotations 

2 

3from typing import Any, ClassVar 

4 

5from pydantic import RootModel 

6 

7from ._generated_spdx_license_literals import ( 

8 DeprecatedLicenseId as DeprecatedLicenseIdLiteral, 

9) 

10from ._generated_spdx_license_literals import LicenseId as LicenseIdLiteral 

11from .validated_string import ValidatedString 

12 

13__all__ = [ 

14 "DeprecatedLicenseId", 

15 "DeprecatedLicenseIdLiteral", 

16 "LicenseId", 

17 "LicenseIdLiteral", 

18] 

19 

20 

21class LicenseId(ValidatedString): 

22 root_model: ClassVar[type[RootModel[Any]]] = RootModel[LicenseIdLiteral] 

23 

24 

25class DeprecatedLicenseId(ValidatedString): 

26 root_model: ClassVar[type[RootModel[Any]]] = RootModel[DeprecatedLicenseIdLiteral]