spdx_tools.spdx3.model.integrity_method

 1# SPDX-FileCopyrightText: 2023 spdx contributors
 2#
 3# SPDX-License-Identifier: Apache-2.0
 4from abc import ABC, abstractmethod
 5
 6from beartype.typing import Optional
 7
 8from spdx_tools.common.typing.dataclass_with_properties import dataclass_with_properties
 9
10
11@dataclass_with_properties
12class IntegrityMethod(ABC):
13    comment: Optional[str] = None
14
15    @abstractmethod
16    def __init__(self):
17        pass
@dataclass_with_properties
class IntegrityMethod(abc.ABC):
12@dataclass_with_properties
13class IntegrityMethod(ABC):
14    comment: Optional[str] = None
15
16    @abstractmethod
17    def __init__(self):
18        pass
comment: Optional[str]
47    def get_field(self) -> field_type:
48        return getattr(self, f"_{field_name}")