Pre-commit is a highly popular framework for installing pre-commit hooks into git projects. This PR adds pre-commit to improve quality-of-life for developers — with pre-commit, developers can easily enforce our style when contributing to pyribs. Adding pre-commit also necessitated fixing files which threw formatting and linting errors.
TODO
[x] Add pre-commit to CI
[x] Run YAPF on files and make changes
[x] Run prettier on Markdown/YAML files and make changes
[x] Update pylint config — previously, we threw many warnings when running the latest pylint because our pylint config included features only intended for Python 2 compatibility
[x] Allow __init__ methods to not have docstrings
[x] Install pytest in the CI so the tests can import it during the pylint check
Description
Pre-commit is a highly popular framework for installing pre-commit hooks into git projects. This PR adds pre-commit to improve quality-of-life for developers — with pre-commit, developers can easily enforce our style when contributing to pyribs. Adding pre-commit also necessitated fixing files which threw formatting and linting errors.
TODO
__init__
methods to not have docstringsQuestions
Status
yapf
pytest
pylint
HISTORY.md