Skip to content

Commit 89b688d

Browse files
authored
bug:SP-1777 Fixes return type in undeclared component's SBOM file method
* bug:SP-1777 Fixes return type in undeclared component's SBOM file method
1 parent 8ca4318 commit 89b688d

File tree

10 files changed

+20
-114
lines changed

10 files changed

+20
-114
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Added
1010
- Upcoming changes...
1111

12+
## [1.17.3] - 2024-11-05
13+
### Fixed
14+
- Fixed undeclared policy
15+
16+
1217
## [1.17.2] - 2024-11-01
1318
### Fixed
1419
- Fixed parsing of dependencies in Policy Checks
@@ -378,4 +383,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
378383
[1.16.0]: https://github.com/scanoss/scanoss.py/compare/v1.15.0...v1.16.0
379384
[1.17.0]: https://github.com/scanoss/scanoss.py/compare/v1.16.0...v1.17.0
380385
[1.17.1]: https://github.com/scanoss/scanoss.py/compare/v1.17.0...v1.17.1
381-
[1.17.2]: https://github.com/scanoss/scanoss.py/compare/v1.17.1...v1.17.2
386+
[1.17.2]: https://github.com/scanoss/scanoss.py/compare/v1.17.1...v1.17.2
387+
[1.17.3]: https://github.com/scanoss/scanoss.py/compare/v1.17.2...v1.17.3

src/scanoss/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
THE SOFTWARE.
2323
"""
2424

25-
__version__ = "1.17.2"
25+
__version__ = "1.17.3"

src/scanoss/cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
from pathlib import Path
2727
import sys
2828
import pypac
29-
from scanoss.inspection.copyleft import Copyleft
30-
from scanoss.inspection.undeclared_component import UndeclaredComponent
29+
30+
from .inspection.copyleft import Copyleft
31+
from .inspection.undeclared_component import UndeclaredComponent
3132
from .threadeddependencies import SCOPE
3233
from .scanoss_settings import ScanossSettings
3334
from .scancodedeps import ScancodeDeps

src/scanoss/inspection/copyleft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"""
2424
import json
2525
from typing import Dict, Any
26-
from scanoss.inspection.policy_check import PolicyCheck, PolicyStatus
26+
from .policy_check import PolicyCheck, PolicyStatus
2727

2828
class Copyleft(PolicyCheck):
2929
"""

src/scanoss/inspection/policy_check.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
from abc import abstractmethod
2727
from enum import Enum
2828
from typing import Callable, List, Dict, Any
29-
from scanoss.inspection.utils.license_utils import LicenseUtil
30-
from scanoss.scanossbase import ScanossBase
29+
from .utils.license_utils import LicenseUtil
30+
from ..scanossbase import ScanossBase
31+
3132

3233
class PolicyStatus(Enum):
3334
"""

src/scanoss/inspection/undeclared_component.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"""
2424
import json
2525
from typing import Dict, Any
26-
from scanoss.inspection.policy_check import PolicyCheck, PolicyStatus
26+
from .policy_check import PolicyCheck, PolicyStatus
2727

2828
class UndeclaredComponent(PolicyCheck):
2929
"""
@@ -115,7 +115,7 @@ def _markdown(self, components: list) -> Dict[str,Any]:
115115
'summary': self._get_summary(components),
116116
}
117117

118-
def _generate_sbom_file(self, components: list) -> dict[str, list[dict[str, str]]]:
118+
def _generate_sbom_file(self, components: list) -> dict:
119119
"""
120120
Generate a list of PURLs for the SBOM file.
121121

src/scanoss/inspection/utils/license_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2222
THE SOFTWARE.
2323
"""
24-
from scanoss.scanossbase import ScanossBase
24+
from ...scanossbase import ScanossBase
2525

2626
DEFAULT_COPYLEFT_LICENSES = {
2727
'agpl-3.0-only', 'artistic-1.0', 'artistic-2.0', 'cc-by-sa-4.0', 'cddl-1.0', 'cddl-1.1', 'cecill-2.1',

src/scanoss/inspection/utils/markdown_utils.py

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/scanoss/inspection/utils/result_utils.py

Lines changed: 0 additions & 79 deletions
This file was deleted.

tests/policy-inspect-test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
import re
2727
import unittest
2828

29-
from scanoss.inspection.copyleft import Copyleft
30-
from scanoss.inspection.undeclared_component import UndeclaredComponent
29+
from src.scanoss.inspection.copyleft import Copyleft
30+
from src.scanoss.inspection.undeclared_component import UndeclaredComponent
3131

3232

3333
class MyTestCase(unittest.TestCase):

0 commit comments

Comments
 (0)