Skip to content

Remove F405 from Ruff ignore list - #2828

Open
arubittu wants to merge 1 commit into
Lightning-AI:mainfrom
arubittu:fix-ruff-f405
Open

Remove F405 from Ruff ignore list#2828
arubittu wants to merge 1 commit into
Lightning-AI:mainfrom
arubittu:fix-ruff-f405

Conversation

@arubittu

Copy link
Copy Markdown

Removes F405 from Ruff’s global ignore list by importing the names used in thunder.core.utils explicitly. The intentional wildcard imports stay in place so the module namespace does not change. The metadata wildcard import is replaced with explicit re-exports.

Addresses part of #2218.

Testing:

  • ruff check . --select F405
  • ruff check thunder/core/utils.py thunder/__init__.py
  • pytest thunder/tests/test_core.py -q (161 passed)

@arubittu
arubittu requested a review from mruberry as a code owner August 12, 2026 04:51
@arubittu

Copy link
Copy Markdown
Author

The pre-commit.ci failure comes from the pyupgrade hook crashing on Python 3.14 with TypeError: cannot use a bytes pattern on a string-like object. All other pre-commit hooks passed. This is the same issue addressed by #2824.

@arubittu

Copy link
Copy Markdown
Author

I checked the failed CI logs:

  • the stable PyTorch main and gradient suites pass
  • the PyTorch nightly jobs treat the new inline_inbuilt_nn_modules deprecation warning as an error during test collection
  • the notebook jobs stop during setup because pip cannot uninstall the Debian cryptography package without a RECORD file
  • Transformer Engine cannot find a matching wheel and its source build expects the missing nccl_dev_cap.hpp PyTorch header
  • Read the Docs imports a PyTorch build without Tensor.align_as
  • pre-commit still hits the Python 3.14 pyupgrade crash addressed by fix(pre-commit.ci): pin pyupgrade to Python 3.13 to avoid crash on 3.14 #2824

These failures appear to come from CI images or dependency changes rather than this Ruff cleanup.

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.

1 participant