-
-
Notifications
You must be signed in to change notification settings - Fork 566
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
Fix replace nbqa ruff to ruff #3483
Fix replace nbqa ruff to ruff #3483
Conversation
Hello @Saransh-cpp and @agriyakhetarpal
|
I think we needed to add this line
This should be the 5431dec perfect changes and this line |
.pre-commit-config.yaml
Outdated
@@ -4,18 +4,11 @@ ci: | |||
|
|||
repos: | |||
- repo: https://github.com/astral-sh/ruff-pre-commit | |||
rev: "v0.1.1" | |||
rev: "v0.1.3" | |||
hooks: | |||
- id: ruff | |||
args: [--fix, --ignore=E741, --exclude=__init__.py] |
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.
args: [--fix, --ignore=E741, --exclude=__init__.py] | |
args: [--fix, --show-fixes] |
@@ -0,0 +1,4 @@ | |||
extend-include = ["*.ipynb"] |
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.
extend-include = ["*.ipynb"] | |
extend-include = ["*.ipynb"] | |
extend-exclude = ["__init__.py"] | |
[lint] | |
ignore = [ | |
"E741", | |
] |
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.
if dont add types_or: [python, pyi, jupyter]
this to pre-commit-config.yaml then it is not checking .ipynb
i mean if i remove "E703"
from ruff.toml and then try to run the test then there is no changes in .ipynb it did not remove ;
.
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.
Yes, this should be expected, since we don't want to remove the semicolons
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.
Thanks, @Rjchauhan18! Looks great now!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3483 +/- ##
========================================
Coverage 99.58% 99.58%
========================================
Files 256 256
Lines 20048 20048
========================================
Hits 19965 19965
Misses 83 83
☔ View full report in Codecov by Sentry. |
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.
Woops, missed this
- id: nbqa-ruff | ||
additional_dependencies: [ruff==0.0.284] | ||
args: ["--fix","--ignore=E501,E402"] | ||
args: [--fix, --show-fixes] |
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.
args: [--fix, --show-fixes] | |
args: [--fix, --show-fixes] | |
types_or: [python, pyi, jupyter] |
Hey @Saransh-cpp |
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.
Thanks for working on this, @Rjchauhan18!
Description
.pre-commit-config.yaml
file and added ruff.toml for lint the jupyter notebook.Fixes # (issue)
nbqa-ruff
withruff
#3476Type of change
Key checklist:
$ pre-commit run
(or$ nox -s pre-commit
) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)$ python run-tests.py --all
(or$ nox -s tests
)$ python run-tests.py --doctest
(or$ nox -s doctests
)You can run integration tests, unit tests, and doctests together at once, using
$ python run-tests.py --quick
(or$ nox -s quick
).Further checks: