Skip to content

Commit

Permalink
Hardening suggestions for codemodder-python / req-r-lines (#417)
Browse files Browse the repository at this point in the history
Simplify Boolean Expressions Using `startswith` and `endswith`

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
  • Loading branch information
pixeebot[bot] authored Mar 27, 2024
1 parent 4fe8894 commit b5b2ccf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ def _clean_lines(self, lines: list[str]) -> set[str]:
return set(
line.split("#")[0].strip()
for line in lines
if not (line.startswith("#") or line.startswith("-r "))
if not line.startswith(("#", "-r "))
)

0 comments on commit b5b2ccf

Please sign in to comment.