-
Notifications
You must be signed in to change notification settings - Fork 3
Use pre-commit in ci #155
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
Use pre-commit in ci #155
Conversation
| # The following packages are considered to be unsafe in a requirements file: | ||
| # setuptools |
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.
Where is this coming from?
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.
pip-compile. I used it instead of pip-compile-multi this time because I only updated the one file. Note that the old file also didn't contain setuptools.
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.
I don't see setuptools in the new 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.
My guess is that setuptools would be included in the requirements but pip-compile decided to leave it out. So it left a comment explaining it. But pip-compile-multi does not leave the comment despite also not adding setuptools as a dependency.
requirements/static.in
Outdated
| toml | ||
| tox | ||
| yapf | ||
| pre-commit No newline at end of file |
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.
Github is saying the newline at the end of the file was deleted. Do we want to be consistent with this and is there a tool we can add to the pre-commit?
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.
Yes there is https://github.com/pre-commit/pre-commit-hooks#end-of-file-fixer
Should I add it?
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.
I would say yes?
Would be good if we could have all our rules in a single place, so we don't have to update 10 repos whevever we add a new pre-commit check. But then we don't want to end up in the situation like the Azure pipeline templates which made it cumbersome to make changes to the rules...
|
@nvaytet Do you have more comments? |
We should also update the docs to clearly tell people to use pre-commit locally. Otherwise, this could be painful for some.