From 73fc93553dd5a658962debdb6bbd1a8a8b6937ed Mon Sep 17 00:00:00 2001 From: Michael Harbarth Date: Wed, 16 Oct 2024 17:16:37 +0200 Subject: [PATCH] fix: fix mypy --- .pre-commit-config.yaml | 2 +- capella2polarion/data_models.py | 2 -- tests/test_elements.py | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0934cde..c1a6172 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,7 +57,7 @@ repos: - capellambse==0.6.6 - click - jinja2 - - polarion-rest-api-client==1.1.3 + - polarion-rest-api-client==1.2.0 - pydantic - types-requests - types-PyYAML diff --git a/capella2polarion/data_models.py b/capella2polarion/data_models.py index 6678492..5a68ab8 100644 --- a/capella2polarion/data_models.py +++ b/capella2polarion/data_models.py @@ -7,7 +7,6 @@ import dataclasses import hashlib import json -import typing as t import polarion_rest_api_client as polarion_api @@ -57,7 +56,6 @@ def calculate_checksum(self) -> str: data = dict(sorted(data.items())) converted = json.dumps(data).encode("utf8") - # pylint: disable=attribute-defined-outside-init self.checksum = json.dumps( {"__C2P__WORK_ITEM": hashlib.sha256(converted).hexdigest()} | dict(sorted(attachment_checksums.items())) diff --git a/tests/test_elements.py b/tests/test_elements.py index 17b6887..99ef35b 100644 --- a/tests/test_elements.py +++ b/tests/test_elements.py @@ -1648,8 +1648,8 @@ def test_diagram(model: capellambse.MelodyModel): "uuid_capella": TEST_ACTOR_UUID, "description": polarion_api.HtmlContent( markupsafe.Markup( - "

Principal of Hogwarts, wearer of the elder wand " - "and greatest mage of all time.

\n" + "

Principal of Hogwarts, wearer of the elder" + " wand and greatest mage of all time.

\n" ) ), },