Skip to content
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

Update pre-commit hooks. #188

Merged
merged 7 commits into from
Dec 5, 2019
Merged

Conversation

tobli
Copy link
Contributor

@tobli tobli commented Oct 19, 2019

Results of running pre-commit autoupdate, and fixing resulting lint errors. Also make sure all hooks execute with python 3.

Results of running `pre-commit autoupdate`, and fixing resulting lint errors. Also make sure all hooks execute with python 3.
@tobli
Copy link
Contributor Author

tobli commented Oct 19, 2019

This reduces, but does not fix, my issues of getting make test_lint to run locally. I still get the following errors:

Reorder python imports...................................................Failed
hookid: reorder-python-imports

Files were modified by this hook. Additional output:

Reordering imports in cartography/sync.py
Reordering imports in tests/integration/conftest.py
Reordering imports in tests/integration/test_basic.py
Reordering imports in cartography/driftdetect/get_states.py

Fixing the import orders locally gets my local lint (python 3.7.4) working, but it fails in Travis (that wants to revert my changes). I don't know enough python to understand what's going on with that. At least this PR makes Travis and my local setup disagree a bit less…

@stale
Copy link

stale bot commented Oct 26, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale stalebot believes this issue/PR is no longer active label Oct 26, 2019
@achantavy
Copy link
Contributor

Can you provide more information your setup? In particular what are the imports that are failing?

@stale stale bot removed the stale stalebot believes this issue/PR is no longer active label Nov 7, 2019
achantavy
achantavy previously approved these changes Nov 7, 2019
@achantavy
Copy link
Contributor

You probably found this out already, but if make test_lint gives an error the first time, pre-commit will typically make a change to fix the lint problem:
Screen Shot 2019-12-05 at 2 30 55 PM

After that, you can add and commit the change and CI should work.

@achantavy achantavy merged commit aafda82 into cartography-cncf:master Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants