Skip to content

Commit

Permalink
Simplify condition
Browse files Browse the repository at this point in the history
  • Loading branch information
bhirsz committed Apr 8, 2024
1 parent 357bbab commit 18c6640
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions robocop/checkers/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,11 @@ def check_duplicates(self, tags):
def check_tag(self, tag_token, node):
var_found = False
substrings = []
after = ""
after = tag_token.value
for match in variable_matcher.VariableMatches(tag_token.value, ignore_errors=True):
substrings.append(match.before)
var_found = var_found or bool(match.match)
after = match.after
if var_found:
substrings.append(after)
else:
substrings = [tag_token.value]
substrings.append(after)
for substring in substrings:
if self.check_tag_substring(substring, tag_token, node):
break
Expand Down

0 comments on commit 18c6640

Please sign in to comment.