---
repos:
  - repo: https://github.com/python/black
    rev: 22.8.0
    hooks:
      - id: black
  - repo: https://github.com/codespell-project/codespell
    rev: v2.2.1
    hooks:
      - id: codespell
        args:
          - --skip=*.css,*.js,*.map,*.scss,*svg
          - --ignore-words-list=magent
  - repo: https://github.com/PyCQA/flake8
    rev: 5.0.4
    hooks:
      - id: flake8
        args:
          - '--per-file-ignores=*/__init__.py:F401 test/all_parameter_combs_test.py:F405 pettingzoo/classic/go/go.py:W605'
          - --extend-ignore=E203
          - --max-complexity=205
          - --max-line-length=300
          - --show-source
          - --statistics
  - repo: https://github.com/PyCQA/isort
    rev: 5.10.1
    hooks:
      - id: isort
        args: ["--profile", "black"]
  - repo: https://github.com/asottile/pyupgrade
    rev: v2.38.0
    hooks:
      - id: pyupgrade
        # TODO: remove `--keep-runtime-typing` option
        args: ["--py37-plus", "--keep-runtime-typing"]
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.3.0
    hooks:
      - id: mixed-line-ending
        args: ["--fix=lf"]
  - repo: https://github.com/pycqa/pydocstyle
    rev: 6.1.1
    hooks:
      - id: pydocstyle
        args:
          - --source
          - --explain
          - --convention=google
          - --count
          # TODO: Remove ignoring rules D101, D102, D103, D105
          - --add-ignore=D100,D107,D101,D102,D103,D105
        exclude: "__init__.py$|^pettingzoo.test|^docs"
        additional_dependencies: ["toml"]
  - repo: local
    hooks:
      - id: pyright
        name: pyright
        entry: pyright
        language: node
        pass_filenames: false
        types: [python]
        additional_dependencies: ["pyright"]
