diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2be68e4c5..e6ad0959a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,14 +3,14 @@ name: ci on: [push, pull_request] env: - X_PYTHON_VERSION: "3.10" + X_PYTHON_VERSION: "3.12" jobs: test: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.9", "3.11"] + python-version: ["3.8", "3.10", "3.12"] env: COUCHDB_ADMIN_PASSWORD: "yo0Quai3" services: diff --git a/basyx/aas/model/submodel.py b/basyx/aas/model/submodel.py index 6e7cc5022..47e5a2ff5 100644 --- a/basyx/aas/model/submodel.py +++ b/basyx/aas/model/submodel.py @@ -779,14 +779,15 @@ def _check_constraints(self, new: _SE, existing: Iterable[_SE]) -> None: f"semantic_id, got {new!r} with semantic_id={new.semantic_id!r}") # If we got here we know that `new` is an instance of type_value_list_element and that type_value_list_element - # is either Property or Range. Thus, `new` must have the value_type property. Ignore the type here because - # the typechecker doesn't get it. + # is either Property or Range. Thus, `new` must have the value_type property. + # Furthermore, value_type_list_element cannot be None, as this is already checked in __init__(). + # Ignore the types here because the typechecker doesn't get it. if self.type_value_list_element in (Property, Range) \ and new.value_type is not self.value_type_list_element: # type: ignore raise base.AASConstraintViolation(109, "All first level elements must have the value_type " # type: ignore "specified by value_type_list_element=" - f"{self.value_type_list_element.__name__}, got {new!r} with " - f"value_type={new.value_type.__name__}") # type: ignore + f"{self.value_type_list_element.__name__}, got " # type: ignore + f"{new!r} with value_type={new.value_type.__name__}") # type: ignore # If semantic_id_list_element is not None that would already enforce the semantic_id for all first level # elements. Thus, we only need to perform this check if semantic_id_list_element is None. diff --git a/setup.py b/setup.py index e2bf0023d..76695d6a3 100755 --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ "aas-compliance-check = basyx.aas.compliance_tool.cli:main" ] }, - python_requires='>=3.7', + python_requires='>=3.8', install_requires=[ 'python-dateutil>=2.8,<3', 'lxml>=4.2,<5',