Tianshou/.pre-commit-config.yaml
Michael Panchenko 600f4bbd55
Python 3.9, black + ruff formatting (#921)
Preparation for #914 and #920

Changes formatting to ruff and black. Remove python 3.8

## Additional Changes

- Removed flake8 dependencies
- Adjusted pre-commit. Now CI and Make use pre-commit, reducing the
duplication of linting calls
- Removed check-docstyle option (ruff is doing that)
- Merged format and lint. In CI the format-lint step fails if any
changes are done, so it fulfills the lint functionality.

---------

Co-authored-by: Jiayi Weng <jiayi@openai.com>
2023-08-25 14:40:56 -07:00

18 lines
625 B
YAML

# version is pinned here, if CI is broken, check if there is a new version
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.283
hooks:
- id: ruff
args: [--fix, --fix-only, --exit-non-zero-on-fix]
- repo: https://github.com/hauntsaninja/black-pre-commit-mirror
rev: 23.7.0
hooks:
- id: black
# specify workers explicitly to workaround https://github.com/psf/black/issues/2513
args: [--line-length=100, --exclude="", --workers=6]