File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 17
17
# SPDX-License-Identifier: Apache-2.0
18
18
# Copyright (c) OWASP Foundation. All Rights Reserved.
19
19
20
- from abc import ABC
20
+ from abc import ABC , abstractmethod
21
21
22
22
23
23
class BaseSchemaVersion (ABC ):
@@ -37,8 +37,9 @@ def component_supports_bom_ref(self) -> bool:
37
37
def component_supports_external_references (self ) -> bool :
38
38
return True
39
39
40
+ @abstractmethod
40
41
def get_schema_version (self ) -> str :
41
- pass
42
+ raise NotImplementedError
42
43
43
44
44
45
class SchemaVersion1Dot3 (BaseSchemaVersion ):
Original file line number Diff line number Diff line change 17
17
# SPDX-License-Identifier: Apache-2.0
18
18
# Copyright (c) OWASP Foundation. All Rights Reserved.
19
19
import json
20
- from abc import abstractmethod
20
+ from abc import ABCMeta , abstractmethod
21
21
from typing import List
22
22
23
23
from . import BaseParser
26
26
from ..utils .conda import parse_conda_json_to_conda_package , parse_conda_list_str_to_conda_package , CondaPackage
27
27
28
28
29
- class _BaseCondaParser (BaseParser ):
29
+ class _BaseCondaParser (BaseParser , metaclass = ABCMeta ):
30
+ """Internal abstract parser - not for programmatic use.
30
31
"""
31
- Internal abstract parser - not for programatic use.
32
32
33
- """
34
33
def __init__ (self , conda_data : str ):
35
34
super ().__init__ ()
36
35
self ._conda_packages : List [CondaPackage ] = []
You can’t perform that action at this time.
0 commit comments