Skip to content

Commit

Permalink
fix: Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: micha91 <[email protected]>
  • Loading branch information
ewuerger and micha91 authored Aug 23, 2024
1 parent a4e69b6 commit a6f0686
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions capella2polarion/converters/converter_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,17 +191,16 @@ def _force_link_config(self, links: t.Any) -> list[LinkConfig]:
if isinstance(link, str):
config = LinkConfig(
capella_attr=link,
polarion_role=(pid := add_prefix(link, self._role_prefix)),
link_field=pid,
reverse_field=f"{pid}_reverse",
polarion_role=add_prefix(link, self._role_prefix),
link_field=link,
reverse_field=f"{link}_reverse",
)
elif isinstance(link, dict):
config = LinkConfig(
capella_attr=(lid := link["capella_attr"]),
polarion_role=(
pid := add_prefix(
link.get("polarion_role", lid), self._role_prefix
)
polarion_role=add_prefix(
(pid := link.get("polarion_role", lid)),
self._role_prefix
),
include=link.get("include", {}),
link_field=(lf := link.get("link_field", pid)),
Expand Down

0 comments on commit a6f0686

Please sign in to comment.