diff --git a/.github/workflows/check_codestyle.yml b/.github/workflows/check_codestyle.yml index 4cc16b9c1..08b5e125f 100644 --- a/.github/workflows/check_codestyle.yml +++ b/.github/workflows/check_codestyle.yml @@ -20,13 +20,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest, macos-latest, windows-latest ] - python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ] - exclude: # see https://github.com/actions/runner-images/issues/9770#issuecomment-2085623315 - - python-version: "3.7" - os: macos-latest - include: - - python-version: "3.7" - os: macos-13 + python-version: [ "3.8", "3.9", "3.10", "3.11" ] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml index 0f66cc73f..2149dd267 100644 --- a/.github/workflows/install_and_test.yml +++ b/.github/workflows/install_and_test.yml @@ -17,13 +17,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest, macos-latest, windows-latest ] - python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ] - exclude: # see https://github.com/actions/runner-images/issues/9770#issuecomment-2085623315 - - python-version: "3.7" - os: macos-latest - include: - - python-version: "3.7" - os: macos-13 + python-version: [ "3.8", "3.9", "3.10", "3.11" ] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/prepare_release.yml b/.github/workflows/prepare_release.yml index 1197a3d1d..cb2f5a67f 100644 --- a/.github/workflows/prepare_release.yml +++ b/.github/workflows/prepare_release.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.7' + python-version: '3.8' - name: Set up dependencies run: | python -m pip install --upgrade pip diff --git a/pyproject.toml b/pyproject.toml index aff57e36b..004e67347 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,14 +16,13 @@ classifiers = [ "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", ] urls = { Homepage = "https://github.com/spdx/tools-python" } -requires-python = ">=3.7" +requires-python = ">=3.8" dependencies = ["click", "pyyaml", "xmltodict", "rdflib", "beartype", "uritools", "license_expression", "ply", "semantic_version"] dynamic = ["version"] @@ -31,7 +30,7 @@ dynamic = ["version"] test = ["pytest", "pyshacl", "tzdata"] code_style = ["isort", "black", "flake8"] graph_generation = ["pygraphviz", "networkx"] -development = ["black", "flake8", "isort", "networkx", "pytest"] +development = ["black", "flake8", "isort", "networkx", "pytest", "pyshacl"] [project.scripts] pyspdxtools = "spdx_tools.spdx.clitools.pyspdxtools:main" diff --git a/src/spdx_tools/common/typing/dataclass_with_properties.py b/src/spdx_tools/common/typing/dataclass_with_properties.py index 3f13950d5..e0b5c9614 100644 --- a/src/spdx_tools/common/typing/dataclass_with_properties.py +++ b/src/spdx_tools/common/typing/dataclass_with_properties.py @@ -4,7 +4,7 @@ from dataclasses import dataclass from beartype import beartype -from beartype.roar import BeartypeCallHintException +from beartype.roar import BeartypeCallHintParamViolation def dataclass_with_properties(cls): @@ -30,7 +30,7 @@ def set_field(self, value: field_type): def set_field_with_error_conversion(self, value: field_type): try: set_field(self, value) - except BeartypeCallHintException as err: + except BeartypeCallHintParamViolation as err: error_message: str = f"SetterError {self.__class__.__name__}: {err}" # As setters are created dynamically, their argument name is always "value". We replace it by the diff --git a/src/spdx_tools/spdx/parser/jsonlikedict/snippet_parser.py b/src/spdx_tools/spdx/parser/jsonlikedict/snippet_parser.py index f00779407..3914e686b 100644 --- a/src/spdx_tools/spdx/parser/jsonlikedict/snippet_parser.py +++ b/src/spdx_tools/spdx/parser/jsonlikedict/snippet_parser.py @@ -127,7 +127,7 @@ def validate_pointer_and_get_type(pointer: Dict) -> RangeType: @staticmethod def convert_range_from_str( - _range: Tuple[Union[int, str], Union[int, str]] + _range: Tuple[Union[int, str], Union[int, str]], ) -> Tuple[Union[int, str], Union[int, str]]: # XML does not support integers, so we have to convert from string (if possible) if not _range: diff --git a/src/spdx_tools/spdx3/bump_from_spdx2/relationship.py b/src/spdx_tools/spdx3/bump_from_spdx2/relationship.py index 918cbdafb..dd6909c49 100644 --- a/src/spdx_tools/spdx3/bump_from_spdx2/relationship.py +++ b/src/spdx_tools/spdx3/bump_from_spdx2/relationship.py @@ -218,7 +218,7 @@ def bump_relationship( def determine_completeness_and_to( - related_spdx_element_id: Union[str, SpdxNone, SpdxNoAssertion] + related_spdx_element_id: Union[str, SpdxNone, SpdxNoAssertion], ) -> Tuple[Optional[RelationshipCompleteness], List[str]]: if isinstance(related_spdx_element_id, SpdxNoAssertion): completeness = RelationshipCompleteness.NOASSERTION diff --git a/src/spdx_tools/spdx3/writer/console/__init__.py b/src/spdx_tools/spdx3/writer/console/__init__.py index 39bbda884..46eabf875 100644 --- a/src/spdx_tools/spdx3/writer/console/__init__.py +++ b/src/spdx_tools/spdx3/writer/console/__init__.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: 2023 spdx contributors # # SPDX-License-Identifier: Apache-2.0 -""" This is a temporary package to write the implemented model of spdx_tools.spdx3.0 to console. As soon as - serialization formats are properly defined this package can be deleted.""" +"""This is a temporary package to write the implemented model of spdx_tools.spdx3.0 to console. As soon as +serialization formats are properly defined this package can be deleted."""