-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Format Python code with black and isort #201
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
Conversation
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 good to me. I left 2 minor comments.
""" | ||
From https://www.learnpythonwithrune.org/numpy-compute-mandelbrot-set-by-vectorization/. |
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.
Removing the "From" prefix doesn't seem necessary.
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.
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.
We could put From
on a separate line.
pyscriptjs/src/pyscript.py
Outdated
@@ -68,7 +72,7 @@ def format_mime(obj): | |||
format_dict, md_dict = mimebundle | |||
else: | |||
format_dict = mimebundle | |||
md_dict = {} | |||
md_dict = {} # noqa: F841 |
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.
md_dict
can be removed if it's not used. We shouldn't add the noqa
here.
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.
Removed.
@cclauss How would you feel about moving the linting config to pre-commit, so we make it easier to use locally, cross-platform and allow us to expand it to cover other types of code quality checks? /cc @mattkram |
@cclauss Thank you for the PR and for prompting this discussion. As @pww217 mentioned, we're working to integrate these types of formatting checks and linting into Thank you for introducing me to Tomorrow is FOSS Friday at Anaconda, and I will return to this PR after integrating some additional |
Adds spellchecking and Python linting to the GitHub Action
black --skip-string-normalization .
isort --profile black .
codespell --count --skip="*.js,*.json"
flake8 --builtins=Element,PyItemTemplate,PyListTemplate --max-complexity=10 --max-line-length=88