xonsh/.pre-commit-config.yaml
Noorhteen Raja NJ c2d25ac251
pre-commit hook for pyupgrade (#4583)
* chore: add pyupgrade

* refactor: upgrade code to py3.7+

ran `pre-commit run pyupgrade -a` while excluding changes to ply

* fix: flake errors
2021-12-06 14:42:26 -05:00

40 lines
1 KiB
YAML

repos:
- repo: local
hooks:
- id: black
name: black
# this gets run within development environment.
# Otherwise will raise command not found or use system level binary
entry: black --check xonsh/ xontrib/ tests/
language: system
stages: [ commit ]
types:
- python
- id: qa
name: qa
entry: xonsh run-tests.xsh qa
language: system
stages: [ push ]
pass_filenames: false
types:
- python
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: check-case-conflict
- id: check-merge-conflict
- id: check-yaml
- id: check-toml
# Check for debugger imports and py37+ breakpoint() calls in python source.
- id: debug-statements
- id: check-added-large-files
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.1
hooks:
- id: pyupgrade
args: [--py37-plus]