Skip to content

Commit b5b2ccf

Browse files
Hardening suggestions for codemodder-python / req-r-lines (#417)
Simplify Boolean Expressions Using `startswith` and `endswith` Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
1 parent 4fe8894 commit b5b2ccf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/codemodder/project_analysis/file_parsers/requirements_txt_file_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ def _clean_lines(self, lines: list[str]) -> set[str]:
4848
return set(
4949
line.split("#")[0].strip()
5050
for line in lines
51-
if not (line.startswith("#") or line.startswith("-r "))
51+
if not line.startswith(("#", "-r "))
5252
)

0 commit comments

Comments
 (0)