CI add end-of-file-fixer #36826
Merged
CI add end-of-file-fixer #36826
Conversation
I actually get an error when I try to use this or the yesqa hook (it's the same error), do you know what this might be about:
Full log: version information
error information
|
I've seen that before, yes - I think |
I did that and a different error happens:
Might be the same issue as here: pypa/virtualenv#1876 |
I think I was able to fix it by uninstalling virtualenv in my base conda environment and then reinstalling virtualenv in my pandas-dev environment, but I wonder if this warrants some type of note somewhere for anyone who might have the same problem? |
.pre-commit-config.yaml
Outdated
rev: v3.2.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
exclude: '.html$|^LICENSES/|.csv$|.txt$|.svg$' |
dsaxton
Oct 4, 2020
Member
I wonder if we might actually want to exclude .py files and only check others (e.g., .yml), since I think .py files will already fail black if they're missing the EOF newline?
kesmit13
added a commit
to kesmit13/pandas
that referenced
this pull request
Nov 2, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
xref #36600 (comment)
Note: in addition to adding the end-of-file-fixer pre-commit hook, I applied the following
I don't know how many of these we want to apply this to, for now I'm just excluding licenses (which I don't think should be touched?), html, txt, svg,and csv files