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

chore: Use native Ruff Jupyter support #2383

Merged

Conversation

henryiii
Copy link
Member

@henryiii henryiii commented Nov 17, 2023

This is a quick update to pre-commit to use the native notebook support in Ruff rather than an adaptor.

I was looking at ruff-format, but can't use it due to the mix of single and double quotes. Ruff has options for both, but not a "let me mix and match" mode like black.

* Remove github.com/nbQA-dev/nbQA in favor of native Ruff Jupyter support.
* Add support for python, pyi, jupyter types to black-jupyter hook.
* Update github.com/astral-sh/ruff-pre-commit: v0.1.4 → v0.1.6.

Copy link

codecov bot commented Nov 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (156bd11) 98.28% compared to head (8213848) 98.28%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2383   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files          69       69           
  Lines        4539     4539           
  Branches      803      803           
=======================================
  Hits         4461     4461           
  Misses         45       45           
  Partials       33       33           
Flag Coverage Δ
contrib 97.86% <ø> (ø)
doctest 60.71% <ø> (ø)
unittests-3.10 96.29% <ø> (ø)
unittests-3.11 96.29% <ø> (ø)
unittests-3.8 96.32% <ø> (ø)
unittests-3.9 96.34% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

.pre-commit-config.yaml Outdated Show resolved Hide resolved
@matthewfeickert matthewfeickert force-pushed the henryiii/chore/nativeruffjupyter branch from badb3c6 to 8213848 Compare November 17, 2023 20:34
@matthewfeickert matthewfeickert added chore Other changes that don't modify src or test files pre-commit Related to pre-commit hooks need-to-backport tmp label until can be backported to patch release branch labels Nov 17, 2023
Copy link
Member

@matthewfeickert matthewfeickert left a comment

Choose a reason for hiding this comment

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

Thanks @henryiii! LGTM now after that small fix.

@matthewfeickert matthewfeickert changed the title chore: use native Ruff Jupyter support chore: Use native Ruff Jupyter support Nov 17, 2023
@matthewfeickert matthewfeickert merged commit f78442a into scikit-hep:main Nov 17, 2023
20 of 21 checks passed
@matthewfeickert matthewfeickert removed the need-to-backport tmp label until can be backported to patch release branch label Jan 5, 2024
matthewfeickert added a commit that referenced this pull request Jan 5, 2024
* Backport:
   - PR #2378
   - PR #2380
   - PR #2381
   - PR #2382
   - PR #2383
   - PR #2386
   - PR #2412
   - PR #2414
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Other changes that don't modify src or test files pre-commit Related to pre-commit hooks
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants