-
Notifications
You must be signed in to change notification settings - Fork 340
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
Add nbqa to pre-commit config #997
Conversation
Interesting! I haven't used nbqa before but it seems really helpful. |
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.
Looks like nbqa had lots of tiny fixes but this looks like it's going to be helpful in making our notebooks nice and consistent. Thank you again for this and #996!
@@ -287,7 +304,7 @@ | |||
"name": "python", | |||
"nbconvert_exporter": "python", | |||
"pygments_lexer": "ipython3", | |||
"version": "3.8.2" | |||
"version": "3.9.1" |
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.
This line makes me happy.
- repo: https://github.com/nbQA-dev/nbQA | ||
rev: 0.5.7 | ||
hooks: | ||
- id: nbqa-black | ||
additional_dependencies: [black==19.10b0] | ||
args: [--nbqa-mutate] | ||
- id: nbqa-isort | ||
additional_dependencies: [isort==5.7.0] | ||
args: [--nbqa-mutate] |
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.
Again, this is nice readable code.
https://github.com/PlasmaPy/PlasmaPy/runs/1792630778 shows just about how it'd show up before committing if actually using pre-commit (as I keep telling people to... 😅 ), or if a notebook has errors. It's probably easiest to apply those fixes by installing pre-commit and running it :D |
Anyway, my point is: if you're fine with how this outputs, feel free to merge :) |
docstrings.