Skip to content

Commit

Permalink
De-duplicate codes in require code example
Browse files Browse the repository at this point in the history
Fixes #25
  • Loading branch information
plinss committed Jun 20, 2023
1 parent 9657739 commit 6a95285
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flake8_noqa/noqa_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def violations(self) -> Iterator[tuple[int, int, str, Any]]:
if (self.require_code):
yield self._message(comment.token, Message.NOQA_REQUIRE_CODE,
comment=comment.text, noqa_strip=comment.noqa.strip(),
codes=', '.join(sorted(reports)))
codes=', '.join(sorted(set(reports))))

else:
yield self._message(comment.token, Message.NOQA_NO_VIOLATIONS, comment=comment.text)
Expand Down

0 comments on commit 6a95285

Please sign in to comment.