This PR addresses #772 (updates Atari wrappers to work with new Gym API) and some additional issues: - Pre-commit was using gitlab for flake8, which as of recently requires authentication -> Replaced with GitHub - Yapf was quietly failing in pre-commit. Changed it such that it fixes formatting in-place - There is an incompatibility between flake8 and yapf where yapf puts binary operators after the line break and flake8 wants it before the break. I added an exception for flake8. - Also require `packaging` in setup.py My changes shouldn't change the behaviour of the wrappers for older versions, but please double check. Idk whether it's just me, but there are always some incompatibilities between yapf and flake8 that need to resolved manually. It might make sense to try black instead.
36 lines
798 B
YAML
36 lines
798 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/google/yapf
|
|
rev: v0.32.0
|
|
hooks:
|
|
- id: yapf
|
|
args: [-r, -i]
|
|
|
|
- repo: https://github.com/pycqa/isort
|
|
rev: 5.10.1
|
|
hooks:
|
|
- id: isort
|
|
name: isort
|
|
|
|
- repo: https://github.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)
|