Skip to content

Add autoflake and pyupgrade to pre-commit configuration #88

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

Merged
merged 3 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ A template for new Python projects, with:
* [black][black]
* [flake8][flake8] (with [bugbear][flake8-bugbear], [simplify][flake8-simplify],
and [pep8-naming][pep8-naming])
* [autoflake][autoflake]
* [pyupgrade][pyupgrade]
* [bandit][bandit]
* [cruft][cruft]
* GitHub Actions support
Expand Down Expand Up @@ -64,6 +66,7 @@ cookiecutter https://github.com/smkent/cookie-python
* Update test expected output files from test results:
`poetry run poe updatetests`

[autoflake]: https://github.com/PyCQA/autoflake
[bandit]: https://github.com/PyCQA/bandit
[black]: https://github.com/psf/black
[codecov]: https://codecov.io/gh/smkent/cookie-python
Expand All @@ -84,4 +87,5 @@ cookiecutter https://github.com/smkent/cookie-python
[pre-commit]: https://pre-commit.com/
[pypi]: https://pypi.org/project/cookie-python/
[pytest]: https://docs.pytest.org
[pyupgrade]: https://github.com/asottile/pyupgrade
[repo]: https://github.com/smkent/cookie-python
8 changes: 8 additions & 0 deletions {{cookiecutter.project_name}}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ repos:
- flake8-pyproject
- flake8-simplify
- pep8-naming
- repo: https://github.com/pycqa/autoflake
rev: v2.0.1
hooks:
- id: autoflake
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
- repo: local
hooks:
- id: mypy
Expand Down