-
Notifications
You must be signed in to change notification settings - Fork 169
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
Small ruff fixes #1177
Small ruff fixes #1177
Conversation
@@ -206,7 +206,7 @@ def set_bgcolor_func(self, func=None): | |||
NOTE: This function stronglye depend on browser and could be easily | |||
broken by changes in browser code | |||
""" | |||
browser = self.get_browser() | |||
# browser = self.get_browser() |
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.
Why comment this?
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.
Because Ruff is complaining about the unused variable. I thought the line went with the below commented out code, so I figured commenting it out made sense?
It may be the wrong thing to do - I didn't check get_browser()
for side effects
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.
It breaks hamster.py which uses api.browser
(line 317) but it could just be replaced with get_browser()
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.
The assignment being commented out is that of a variable local to set_bgcolor_func()
- not of PluginAPI.browser
.
The line being commented out isn't actually doing anything.
This fixes a new issues found by `ruff check`. There are a few more, but they need to be looked into individually. They are instances of the code being left in an inconsistent state.
Merged, thanks! |
This fixes a new issues found by
ruff check
.There are a few more, but they need to be looked into individually. They are instances of the code being left in an inconsistent state.