-
Notifications
You must be signed in to change notification settings - Fork 603
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 files for pre-commit
configuration (pylint
and black
)
#2567
Conversation
Hello. You may have forgotten to update the changelog!
|
…lane into pre_commit_setup_files
Codecov Report
@@ Coverage Diff @@
## master #2567 +/- ##
=======================================
Coverage 99.58% 99.58%
=======================================
Files 243 243
Lines 19595 19595
=======================================
Hits 19514 19514
Misses 81 81 Continue to review full report at Codecov.
|
[sc-19544] |
@antalszava When I ran
I personally see no problem with those files being styled as well, but the regular expression in |
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.
It looks all good, I've added some suggestions. Same as @albi3ro, if I run the all file options, the docs are included and I have both pylint and black errors. Is it possible to change the definition of all files in the config?
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.
@antalszava Thank you, it looks all good 💯
Context:
The
pre-commit
package allows installing git pre-commit hooks. Such a hook refers to running dedicated tools (e.g.,pylint
andblack
) each time a developer issues thegit commit
command locally. If the run for one of the tools fails, then committing fails too. The hook forblack
automatically appliesblack
.Description of the Change:
Adds a
.pre-commit-config.yaml
top level filepyproject.toml
top level fileExtends the documentation of creating a pull request to mention the use of
pre-commit
.Benefits:
An easy and standardized way of configuring git pre-commit hooks for PennyLane developers.
Possible Drawbacks:
As noted in the docs entry, as new versions of
black
are being released,pre-commit autoupdate
may have to be reissued becausepre-commit
installs packagesRelated GitHub Issues:
N/A