Skip to content

Commit f5e42d6

Browse files
authored
Merge pull request #88 from smkent/autoflake-pyupgrade
Add autoflake and pyupgrade to pre-commit configuration
2 parents a4fec71 + 0d9d2ea commit f5e42d6

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ A template for new Python projects, with:
1717
* [black][black]
1818
* [flake8][flake8] (with [bugbear][flake8-bugbear], [simplify][flake8-simplify],
1919
and [pep8-naming][pep8-naming])
20+
* [autoflake][autoflake]
21+
* [pyupgrade][pyupgrade]
2022
* [bandit][bandit]
2123
* [cruft][cruft]
2224
* GitHub Actions support
@@ -64,6 +66,7 @@ cookiecutter https://github.com/smkent/cookie-python
6466
* Update test expected output files from test results:
6567
`poetry run poe updatetests`
6668

69+
[autoflake]: https://github.com/PyCQA/autoflake
6770
[bandit]: https://github.com/PyCQA/bandit
6871
[black]: https://github.com/psf/black
6972
[codecov]: https://codecov.io/gh/smkent/cookie-python
@@ -84,4 +87,5 @@ cookiecutter https://github.com/smkent/cookie-python
8487
[pre-commit]: https://pre-commit.com/
8588
[pypi]: https://pypi.org/project/cookie-python/
8689
[pytest]: https://docs.pytest.org
90+
[pyupgrade]: https://github.com/asottile/pyupgrade
8791
[repo]: https://github.com/smkent/cookie-python

{{cookiecutter.project_name}}/.pre-commit-config.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ repos:
3333
- flake8-pyproject
3434
- flake8-simplify
3535
- pep8-naming
36+
- repo: https://github.com/pycqa/autoflake
37+
rev: v2.0.1
38+
hooks:
39+
- id: autoflake
40+
- repo: https://github.com/asottile/pyupgrade
41+
rev: v3.3.1
42+
hooks:
43+
- id: pyupgrade
3644
- repo: local
3745
hooks:
3846
- id: mypy

0 commit comments

Comments
 (0)