Skip to content

fix: ignore e402 and pre-commit uses ruff.toml config #7634

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repos:
hooks:
- id: ruff-format
- id: ruff
args: [ --fix ]
args: [ --fix, --config, ruff.toml]
- repo: local
hooks:
- id: clean-notebooks
Expand Down
2 changes: 2 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[per-file-ignores]
"tutorials/**/*.py" = ["E402"]
Copy link

Choose a reason for hiding this comment

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

The path pattern should be tutorial/**/*.py (singular) instead of tutorials/**/*.py (plural) to match the directory structure referenced in the PR description. This will ensure the E402 rule is properly ignored for the intended files.

Suggested change
"tutorials/**/*.py" = ["E402"]
"tutorial/**/*.py" = ["E402"]

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.