Skip to content

Commit fa34adb

Browse files
pre-commit-ci[bot]gnikit
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 106330a commit fa34adb

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

fortls/parsers/internal/parser.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2235,9 +2235,7 @@ def replace_vars(line: str):
22352235
def_value = (match.group(5), def_value)
22362236

22372237
defs_tmp[def_name] = def_value
2238-
elif (
2239-
match.group(2) == "undef"
2240-
) and (def_name in defs_tmp):
2238+
elif (match.group(2) == "undef") and (def_name in defs_tmp):
22412239
defs_tmp.pop(def_name, None)
22422240
log.debug(f"{line.strip()} !!! Define statement({i + 1})")
22432241
continue

fortls/regex_patterns.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ class FortranRegularExpressions:
129129
I,
130130
)
131131
PP_DEF: Pattern = compile(
132-
r"[ ]*(#)[ ]*(define|undef|undefined)"
133-
r"[ ]+(\w+)(\([ ]*([ \w,]*?)[ ]*\))?",
132+
r"[ ]*(#)[ ]*(define|undef|undefined)" r"[ ]+(\w+)(\([ ]*([ \w,]*?)[ ]*\))?",
134133
I,
135134
)
136135
PP_DEF_TEST: Pattern = compile(r"(![ ]*)?defined[ ]*\([ ]*(\w*)[ ]*\)$", I)

0 commit comments

Comments
 (0)