-
Notifications
You must be signed in to change notification settings - Fork 171
Fix E401,E701,E711,E712,E721,F402,F403,F821 errors found by ruff #1991
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
Conversation
See the initial list in #1525 (comment)
bmjcode
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
|
@bmjcode What do you think about this error? See also this discussion. debug.py is not used by the regular application and can be activated only if you launch Frescobaldi from the python shell like so: That said, I'm just trying to clear all the errors found by ruff in order to enable the ruff check for future PRs. If there's no easy fix for this, we can tell ruff to skip the F403 errors or disable the check only for these two lines. What do you suggest? |
|
I've added a commit to fix this error: |
|
I fixed one of these F821 errors: The remaining 2038 refer to the use of
[tool.ruff]
ignore-names = ["_"]
I would go for 1. |
|
On F403: I'm trying to figure out what those Qt imports are supposed to do. They come at the very end of I'd just delete the Qt imports unless someone can explain what they're there for. On F821: I'd also go with option 1. Personally I think adding things to builtins is the wrong kind of clever, in part because it breaks tools like ruff, but I don't want to change it if it's working now. I think avoiding all those imports is probably why it was done that way in the first place. |
|
Ok, I've pushed two more commits to fix those errors. Here's the current situation: This means that this PR fixed the following 8 errors: Enough for this PR. |
See the initial list in
#1525 (comment)
I've started working on the easier errors with the smaller number of occurences.
To complete this PR I think I'll give a deeper look into these ones in the next days: