git-hooks.nix
git-hooks.nix copied to clipboard
Feature request: hook for flynt, configuration for pyupgrade
Examples from my current .pre-commit-config.yaml:
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py310-plus]
exclude: /migrations/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
hooks:
- id: mypy
additional_dependencies: ['types-requests', 'types-python-dateutil', 'types-pytz']
exclude: /migrations/
- repo: https://github.com/ikamensh/flynt/
rev: '0.77'
hooks:
- id: flynt
exclude: /migrations/
mypy and pyupgrade are already available, so really this issue is just a request for flynt. Maybe we should update the issue title.
The mypy hook works well, but the pyupgrade hook doesn't allow to define the target Python version, so it's not very usable.
Alright, thanks for clarifying. I'll take a look later this week.