-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(fmt): add black[jupyter]
as a formatting tool
#7256
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?
feat(fmt): add black[jupyter]
as a formatting tool
#7256
Conversation
@SauravMaheshkar - thank you for the contribution! We are currently finalizing last changes for the upcoming stable release, so just a heads up we'll need to hold this up until after the release. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7256 +/- ##
=======================================
Coverage 98.64% 98.64%
=======================================
Files 1106 1106
Lines 95990 95990
=======================================
+ Hits 94691 94692 +1
+ Misses 1299 1298 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -130,7 +130,7 @@ echo "Running the black formatter... (version: $BLACKVERSION)" | |||
|
|||
args=("${arg_color[@]}") | |||
if (( only_print == 1 )); then | |||
args+=("--check" "--diff") | |||
args+=("--check" "--diff" "--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.
The --ipynb
option makes black
execution fail as it considers all files to be jupyter notebooks. Please remove.
The format_files
array needs to include the .ipynb
files to get them checked and formatted. Please make sure these do not leak to isort_files
, because isort
does not seem to work with notebooks. For now, let isort look only at the python files.
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.
Please split this to two PRs for (i) script and requirements update and (ii) notebook formatting. It will make it easier to review the human-written code, and the second formatting-only PR can be then added to .git-blame-ignore-revs
.
Also, please address inline comments.
Fixes #3976. Also includes the changes introduced by running black with the jupyter extension
The repository has grown considerably since I last saw it, so I'm not sure I made changes everywhere. LMK if I'm missing something.
Request for Review: @mhucka