Skip to content

Commit

Permalink
Only count one of the same multiple warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JokeWaumans committed Sep 19, 2024
1 parent 36dc254 commit 80982c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mlx/warnings/regex_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def check(self, content):
content (re.Match): The regex match
'''
match_string = content.group(0).strip()
if not self._is_excluded(match_string):
if not self._is_excluded(match_string) and (content.group('curr') == content.group('max')):
self.count += 1
self.counted_warnings.append(match_string)
self.print_when_verbose(match_string)
Expand Down

0 comments on commit 80982c3

Please sign in to comment.