Skip to content

Commit

Permalink
ci: Update pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
ewuerger committed Feb 28, 2024
1 parent 127e6c1 commit 9901df7
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 74 deletions.
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ default_install_hook_types: [commit-msg, pre-commit]
default_stages: [commit, merge-commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -26,11 +26,11 @@ repos:
- id: fix-byte-order-marker
- id: trailing-whitespace
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.9.1
rev: 24.2.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/PyCQA/docformatter
Expand All @@ -47,14 +47,14 @@ repos:
additional_dependencies:
- pydocstyle[toml]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.8.0
hooks:
- id: mypy
additional_dependencies:
- types-requests
- types-PyYAML
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.1
rev: v1.5.5
hooks:
- id: insert-license
name: Insert license headers (shell-style comments)
Expand Down Expand Up @@ -97,10 +97,10 @@ repos:
- --comment-style
- "..| |"
- repo: https://github.com/fsfe/reuse-tool
rev: v2.1.0
rev: v3.0.1
hooks:
- id: reuse
- repo: https://github.com/qoomon/git-conventional-commits
rev: v2.6.5
rev: v2.6.7
hooks:
- id: conventional-commits
6 changes: 3 additions & 3 deletions capella2polarion/converters/model_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def read_model(
if type_config := config.get_type_config(
layer, c_type, **attributes
):
self.converter_session[
obj.uuid
] = data_session.ConverterData(layer, type_config, obj)
self.converter_session[obj.uuid] = (
data_session.ConverterData(layer, type_config, obj)
)
else:
missing_types.add((layer, c_type, attributes))

Expand Down
128 changes: 64 additions & 64 deletions tests/test_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,15 +479,15 @@ def test_create_links_custom_exchanges_resolver(
base_object.pw.polarion_data_repo.update_work_items(
[work_item_obj_1, work_item_obj_2]
)
base_object.mc.converter_session[
function_uuid
] = data_session.ConverterData(
"fa",
converter_config.CapellaTypeConfig(
type(funtion_obj).__name__, links=["input_exchanges"]
),
funtion_obj,
work_item_obj_1,
base_object.mc.converter_session[function_uuid] = (
data_session.ConverterData(
"fa",
converter_config.CapellaTypeConfig(
type(funtion_obj).__name__, links=["input_exchanges"]
),
funtion_obj,
work_item_obj_1,
)
)
base_object.mc.converter_session[uuid] = data_session.ConverterData(
"fa",
Expand Down Expand Up @@ -563,13 +563,13 @@ def test_create_links_from_ElementList(base_object: BaseObjectContainer):
]
base_object.pw.polarion_data_repo.update_work_items(work_items)
for work_item in work_items:
base_object.mc.converter_session[
work_item.uuid_capella
] = data_session.ConverterData(
"",
base_object.mc.converter_session["uuid1"].type_config,
fake_objects[work_item.uuid_capella],
work_item,
base_object.mc.converter_session[work_item.uuid_capella] = (
data_session.ConverterData(
"",
base_object.mc.converter_session["uuid1"].type_config,
fake_objects[work_item.uuid_capella],
work_item,
)
)

expected_link = polarion_api.WorkItemLink(
Expand Down Expand Up @@ -659,15 +659,15 @@ def test_update_work_items(

base_object.pw.load_polarion_work_item_map()

base_object.mc.converter_session[
"uuid1"
].work_item = data_models.CapellaWorkItem(
id="Obj-1",
uuid_capella="uuid1",
title="Fake 1",
type="type",
description_type="text/html",
description=markupsafe.Markup(""),
base_object.mc.converter_session["uuid1"].work_item = (
data_models.CapellaWorkItem(
id="Obj-1",
uuid_capella="uuid1",
title="Fake 1",
type="type",
description_type="text/html",
description=markupsafe.Markup(""),
)
)

del base_object.mc.converter_session["uuid2"]
Expand Down Expand Up @@ -726,17 +726,17 @@ def test_update_deleted_work_item(

base_object.pw.load_polarion_work_item_map()

base_object.mc.converter_session[
"uuid1"
].work_item = data_models.CapellaWorkItem(
id="Obj-1",
type="type",
uuid_capella="uuid1",
status="open",
title="Something",
description_type="text/html",
description=markupsafe.Markup("Test"),
checksum="123",
base_object.mc.converter_session["uuid1"].work_item = (
data_models.CapellaWorkItem(
id="Obj-1",
type="type",
uuid_capella="uuid1",
status="open",
title="Something",
description_type="text/html",
description=markupsafe.Markup("Test"),
checksum="123",
)
)

del base_object.mc.converter_session["uuid2"]
Expand Down Expand Up @@ -774,13 +774,13 @@ def test_update_work_items_filters_work_items_with_same_checksum(
)
]
)
base_object.mc.converter_session[
"uuid1"
].work_item = data_models.CapellaWorkItem(
id="Obj-1",
uuid_capella="uuid1",
status="open",
type="fakeModelObject",
base_object.mc.converter_session["uuid1"].work_item = (
data_models.CapellaWorkItem(
id="Obj-1",
uuid_capella="uuid1",
status="open",
type="fakeModelObject",
)
)

del base_object.mc.converter_session["uuid2"]
Expand All @@ -806,13 +806,13 @@ def test_update_work_items_same_checksum_force(
)
]
)
base_object.mc.converter_session[
"uuid1"
].work_item = data_models.CapellaWorkItem(
id="Obj-1",
uuid_capella="uuid1",
status="open",
type="fakeModelObject",
base_object.mc.converter_session["uuid1"].work_item = (
data_models.CapellaWorkItem(
id="Obj-1",
uuid_capella="uuid1",
status="open",
type="fakeModelObject",
)
)

del base_object.mc.converter_session["uuid2"]
Expand Down Expand Up @@ -849,21 +849,21 @@ def test_update_links(base_object: BaseObjectContainer):
)
]
)
base_object.mc.converter_session[
"uuid1"
].work_item = data_models.CapellaWorkItem(
id="Obj-1",
uuid_capella="uuid1",
status="open",
type="fakeModelObject",
base_object.mc.converter_session["uuid1"].work_item = (
data_models.CapellaWorkItem(
id="Obj-1",
uuid_capella="uuid1",
status="open",
type="fakeModelObject",
)
)
base_object.mc.converter_session[
"uuid2"
].work_item = data_models.CapellaWorkItem(
id="Obj-2",
uuid_capella="uuid2",
status="open",
type="fakeModelObject",
base_object.mc.converter_session["uuid2"].work_item = (
data_models.CapellaWorkItem(
id="Obj-2",
uuid_capella="uuid2",
status="open",
type="fakeModelObject",
)
)

assert base_object.pw.client is not None
Expand Down

0 comments on commit 9901df7

Please sign in to comment.