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 1717# SPDX-License-Identifier: Apache-2.0
1818# Copyright (c) OWASP Foundation. All Rights Reserved.
1919
20- from abc import ABC
20+ from abc import ABC , abstractmethod
2121
2222
2323class BaseSchemaVersion (ABC ):
@@ -37,8 +37,9 @@ def component_supports_bom_ref(self) -> bool:
3737 def component_supports_external_references (self ) -> bool :
3838 return True
3939
40+ @abstractmethod
4041 def get_schema_version (self ) -> str :
41- pass
42+ raise NotImplementedError
4243
4344
4445class SchemaVersion1Dot3 (BaseSchemaVersion ):
Original file line number Diff line number Diff line change 1717# SPDX-License-Identifier: Apache-2.0
1818# Copyright (c) OWASP Foundation. All Rights Reserved.
1919import json
20- from abc import abstractmethod
20+ from abc import ABCMeta , abstractmethod
2121from typing import List
2222
2323from . import BaseParser
2626from ..utils .conda import parse_conda_json_to_conda_package , parse_conda_list_str_to_conda_package , CondaPackage
2727
2828
29- class _BaseCondaParser (BaseParser ):
29+ class _BaseCondaParser (BaseParser , metaclass = ABCMeta ):
30+ """Internal abstract parser - not for programmatic use.
3031 """
31- Internal abstract parser - not for programatic use.
3232
33- """
3433 def __init__ (self , conda_data : str ):
3534 super ().__init__ ()
3635 self ._conda_packages : List [CondaPackage ] = []
You can’t perform that action at this time.
0 commit comments