Tianshou/.pre-commit-config.yaml
Markus Krimmel b0c8d28a7d
Added pre-commit (#752)
- This PR adds the checks that are defined in the Makefile as pre-commit
hooks.
- Hopefully, the checks are equivalent to those from the Makefile, but I
can't guarantee it.
- CI remains as it is.
- As I pointed out on discord, I experienced some conflicts between
flake8 and yapf, so it might be better to transition to some other
combination (e.g. black).
2022-10-02 08:57:45 -07:00

36 lines
806 B
YAML

---
repos:
# - repo: local
# hooks:
# - id: mypy
# name: mypy
# entry: mypy
# language: python
# pass_filenames: false
# args: [--config-file=setup.cfg, tianshou]
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.32.0
hooks:
- id: yapf
args: [-r]
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort
- repo: https://gitlab.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
args: [--config=setup.cfg, --count, --show-source, --statistics]
additional_dependencies: ["flake8_bugbear"]
- repo: https://github.com/pycqa/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
exclude: ^(test/)|(docs/)|(examples/)|(setup.py)