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

Adds pre-commit hooks for black, flake8, isort #198

Merged
merged 3 commits into from
May 21, 2022

Conversation

chrismoradi
Copy link
Contributor

@chrismoradi chrismoradi commented May 21, 2022

Description

This PR fixes #194

Ran into this issue with new install of black, but the pre-commit hook should be correct.

Questions for reviewer:

  • Is there somewhere I should add documentation on installing and running pre-commit hooks (e.g., README.md or CONTRIBUTING.md)?
  • Do you use the default line length with black? Any other settings that should be specified for other hooks?

@netlify
Copy link

netlify bot commented May 21, 2022

Deploy Preview for robyn canceled.

Name Link
🔨 Latest commit f051e15
🔍 Latest deploy log https://app.netlify.com/sites/robyn/deploys/62891d6e0214e200087f0dd7

@sansyrox
Copy link
Member

Hi @chrismoradi ,

Thank you for the contribution 😄

I have a few suggestions:

@chrismoradi
Copy link
Contributor Author

@sansyrox, I added the default_stage and install instructions to the README (please let me know if you want me to rework that).

For flake8, it looks like it's using the config settings already in .flake8. I tested changing the max line length to 90 and it starts showing line length errors. Happy to add this to the pre-commit config but thought it would add extra maintenance to have this setting in 2 places.

Also added a config line for black to use 160 max line length.

Copy link
Member

@sansyrox sansyrox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀 :shipit:

Thank you so much!

@sansyrox sansyrox merged commit c880c34 into sparckles:main May 21, 2022
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.

[Feature Request] Add precommit hook for black, flake8 and isort
2 participants