Skip to content

Commit 82adeb0

Browse files
Chore: Formatting & Linting
1 parent 4e20739 commit 82adeb0

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

src/extensions/score_metamodel/checks/graph_checks.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
1313
import operator
14-
from itertools import chain
1514
from collections.abc import Callable
1615
from functools import reduce
16+
from itertools import chain
1717
from typing import Any, cast
1818

1919
from score_metamodel import (
@@ -208,14 +208,14 @@ def check_valid_only_links_to_valid(
208208
log: CheckLogger,
209209
):
210210
# Get all possible link types
211-
needs_dict_all = {need["id"]: need for need in all_needs.values()}
212-
needs_dict_local = {
213-
need["id"]: need for need in all_needs.filter_is_external(False).values()
214-
}
215211
# Pre-Filter for only valid & local needs
216-
valid_needs_id_all = [x.id for x in all_needs.values() if x.get("status") == "valid"]
212+
valid_needs_id_all = [
213+
x.id for x in all_needs.values() if x.get("status") == "valid"
214+
]
217215
valid_needs_local = [
218-
x for x in all_needs.filter_is_external(False).values() if x.get("status") == "valid"
216+
x
217+
for x in all_needs.filter_is_external(False).values()
218+
if x.get("status") == "valid"
219219
]
220220

221221
for need in valid_needs_local:

src/extensions/score_metamodel/tests/rst/graph/test_invalid_graph.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
.. We can not yet enable this test. As the check is only an 'info' and not yet a true warning
2323
.. #EXPECT: comp_saf_fmea__child__16: is valid but links to invalid need:
2424
25-
.. comp_saf_fmea:: Child requirement
25+
.. comp_saf_fmea:: Child requirement
2626
:id: comp_saf_fmea__child__1
2727
:safety: QM
2828
:status: valid

src/extensions/score_metamodel/tests/rst/graph/test_metamodel_graph.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,5 +186,3 @@
186186
:safety: ASIL_B
187187
:status: valid
188188
:mitigated_by: feat_req__parent__ASIL_B
189-
190-

0 commit comments

Comments
 (0)