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

Small ruff fixes #1177

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

SqAtx
Copy link
Contributor

@SqAtx SqAtx commented Jan 20, 2025

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.

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.
@@ -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()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why comment this?

Copy link
Contributor Author

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

Copy link
Contributor

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()

@SqAtx SqAtx marked this pull request as draft January 23, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants