bloomberg/pystack

Switch to using pre-commit for managing our linting setup

godlygeek opened this issue · 1 comments

Switch to using https://pre-commit.com/ to manage our linting setup

Some implementation questions (a reminder for me to ask in the sprints tomorrow):

  1. 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?
  2. 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?
  3. This issue is tagged with "github_actions" – should an action be added to use the pre-commit hooks to lint a PR?
  4. 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?
  5. 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?