Skip to content

Commit 408fc92

Browse files
Apply suggestions from code review
Co-authored-by: Maximilian Sören Pollak <maximilian.pollak@expleogroup.com> Signed-off-by: Jochen Hönle <jochen.hoenle@bmw.de>
1 parent 90d6447 commit 408fc92

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/extensions/score_metamodel/checks/id_contains_feature.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def id_contains_feature(app: Sphinx, need: NeedsInfoType, log: CheckLogger):
3838

3939
# Get the part of the string after the first two underscores: the path
4040
feature = parts[1]
41-
featureparts = re.split(r"_-", feature)
41+
featureparts = re.split(r"[_-]", feature)
4242

4343
dir_docname = os.path.dirname(str(need.get("docname", "")))
4444

@@ -56,7 +56,7 @@ def id_contains_feature(app: Sphinx, need: NeedsInfoType, log: CheckLogger):
5656

5757
# allow abbreviation of the feature
5858
initials = "".join(
59-
featurepart[0].lower() for featurepart in featureparts if len(featureparts > 1)
59+
featurepart[0].lower() for featurepart in featureparts if len(featureparts) > 1
6060
)
6161
foundinitials = initials in docname.lower()
6262

0 commit comments

Comments
 (0)