git-hooks.nix icon indicating copy to clipboard operation
git-hooks.nix copied to clipboard

Feature request: hook for flynt, configuration for pyupgrade

Open arjan-s opened this issue 2 years ago • 3 comments

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/

arjan-s avatar Feb 06 '23 16:02 arjan-s

mypy and pyupgrade are already available, so really this issue is just a request for flynt. Maybe we should update the issue title.

totoroot avatar Sep 10 '23 15:09 totoroot

The mypy hook works well, but the pyupgrade hook doesn't allow to define the target Python version, so it's not very usable.

arjan-s avatar Sep 11 '23 13:09 arjan-s

Alright, thanks for clarifying. I'll take a look later this week.

totoroot avatar Sep 11 '23 20:09 totoroot