-
Notifications
You must be signed in to change notification settings - Fork 808
Bump ruff to 0.14.1 and fix new lint warnings #3842
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
base: main
Are you sure you want to change the base?
Conversation
The generate_instrumentation_bootstrap.py script was failing with a ruff linting error (PLC0415: import should be at top-level) when checking the auto_instrumentation module. Add noqa comment to suppress this error for the gevent monkey patch import, which is intentionally inside a try-except block for conditional loading. This allows the bootstrap generation script to complete successfully.
|
@lukeina2z any idea on why our tooling does not raise that? |
I guess he is running a newer ruff version than the one we run in CI. When running with 0.6.9 I don't get the warnings |
@emdneto you are right, I manually installed the missing packages. Here is my pip list: (.venv) anyio 4.11.0 7cf34de09d4c % python --version |
|
@lukeina2z could you please bump ruff version like in open-telemetry/opentelemetry-python#4782 ? |
|
@xrmx Bumped ruff to 0.14.1 and fixed new lint warnings. |
| @@ -1,4 +1,8 @@ | |||
| import pytest | |||
| from tests.shared_test_utils import ( | |||
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.
I think these should be imported from .shared_test_utils import
|
|
||
| import fsspec | ||
| import pytest | ||
| from tests.shared_test_utils import ( |
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.
same
Thanks! a couple of comments but LGTM! |
Description
The generate_instrumentation_bootstrap.py script was failing with a ruff linting error (PLC0415: import should be at top-level) when checking the auto_instrumentation module.
Fixes #3878
Add noqa comment to suppress this error for the gevent monkey patch import, which is intentionally inside a try-except block for conditional loading. This allows the bootstrap generation script to complete successfully.
Error while running generate_instrumentation_bootstrap.py