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

Add Flake8 to CI and isort as Pre-Commit hook #235

Merged
merged 30 commits into from Nov 15, 2019
Merged

Add Flake8 to CI and isort as Pre-Commit hook #235

merged 30 commits into from Nov 15, 2019

Conversation

danyeaw
Copy link
Member

@danyeaw danyeaw commented Nov 10, 2019

To continue to automate more code checks and to improve code quality I have added flake8 and isort to pre-commit. Changes include sorting all of the imports, and fixing all of the issues that flake8 found.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Documentation content changes

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Signed-off-by: Dan Yeaw <dan@yeaw.me>
Remove unused variables

Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Fix tracked by issue #234.

Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
@danyeaw danyeaw added this to the 1.2.0 milestone Nov 10, 2019
@danyeaw
Copy link
Member Author

danyeaw commented Nov 11, 2019

I'm not sure why this is failing CI. It works fine locally running pre-commit run --all-files, but flake8 is not finding some of the noqa comments when running on Pipelines.

Signed-off-by: Dan Yeaw <dan@yeaw.me>
@danyeaw danyeaw changed the title Add Flake8 and isort as Pre-Commit hooks Add Flake8 to CI and isort as Pre-Commit hook Nov 15, 2019
@danyeaw
Copy link
Member Author

danyeaw commented Nov 15, 2019

@amolenaar The weird behavior with different versions of Python and local vs. CI was caused by issues in pyflakes that are fixed in master, but no release has been cut yet. Flake8 bundles pyflakes and other tools. I have removed Flake8 as a pre-commit hook, and manually added a linting step using a development version of pyflakes with flake8. Once pyflakes is released (> 2.2.1), I can add it back in as a pre-commit hook.

Signed-off-by: Dan Yeaw <dan@yeaw.me>
@danyeaw danyeaw merged commit 04009e4 into master Nov 15, 2019
@danyeaw danyeaw deleted the flake8 branch November 15, 2019 02:56
@danyeaw danyeaw added the chore Maintenance related PR label Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Maintenance related PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants