Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply ruff rules to Python scripts #215

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

DimitriPapadopoulos
Copy link
Contributor

This is the last batch. Then I can enable ruff to run in CI.

@sbesson sbesson self-requested a review January 24, 2025 13:59
@snoopycrimecop
Copy link
Member

Conflicting PR. Removed from build BIOFORMATS-push#335. See the console output for more details.
Possible conflicts:

--conflicts

@snoopycrimecop
Copy link
Member

Conflicting PR. Removed from build BIOFORMATS-push#336. See the console output for more details.
Possible conflicts:

--conflicts

@snoopycrimecop
Copy link
Member

snoopycrimecop commented Jan 27, 2025

Conflicting PR. Removed from build BIOFORMATS-push#337. See the console output for more details.
Possible conflicts:

--conflicts Conflict resolved in build BIOFORMATS-push#338. See the console output for more details.

F841 Local variable is assigned to but never used
E401 Multiple imports on one line
E713 Test for membership should be `not in`
E722 Do not use bare `except`
I001 Import block is un-sorted or un-formatted
C405 Unnecessary list literal (rewrite as a set literal)
B007 Loop control variable not used within loop body
RET504 Unnecessary assignment to before `return` statement
PLR0402 Use `from ... import ...` in lieu of alias
PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
PERF401 Use a list comprehension to create a transformed list
RUF015 Prefer `next(iter(parents.keys()))` over single element slice
RUF022 `__all__` is not sorted
RUF039 First argument to `re.split()` is not raw string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants