Switch to using pre-commit for managing our linting setup
godlygeek opened this issue · 1 comments
godlygeek commented
Switch to using https://pre-commit.com/ to manage our linting setup
stefmolin commented
Some implementation questions (a reminder for me to ask in the sprints tomorrow):
- I see black, flake8, and isort in the pyproject.toml, which have hooks built-in, along with mypy, which requires the use of a mirror. Which libraries are you looking to include as hooks?
- In order for contributors to use the pre-commit hooks, there is some setup required. Is there a specific spot to place this information in CONTRIBUTING.md or is under the
Pull requests
section fine? - This issue is tagged with "github_actions" – should an action be added to use the pre-commit hooks to lint a PR?
- There are some additional pre-commit hooks that I like to use to check for valid YAML, TOML, rST formatting, and more. Are you interested in adding these or is there a specific list?
- While testing the current implementation of the pre-commit hooks, I noticed that there were a few files with issues (trailing spaces, black reformatting, isort import order). Should I fix this in this PR or a separate one?