File tree Expand file tree Collapse file tree
src/extensions/score_metamodel Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111# SPDX-License-Identifier: Apache-2.0
1212# *******************************************************************************
1313import operator
14- from itertools import chain
1514from collections .abc import Callable
1615from functools import reduce
16+ from itertools import chain
1717from typing import Any , cast
1818
1919from 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 :
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 186186 :safety: ASIL_B
187187 :status: valid
188188 :mitigated_by: feat_req__parent__ASIL_B
189-
190-
You can’t perform that action at this time.
0 commit comments