repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: trailing-whitespace
      - id: mixed-line-ending
      - id: check-json
      - id: end-of-file-fixer
      - id: name-tests-test
        args: [ "--django" ]
        exclude: ^tests/tests_cli/(base|fixtures)\.py$
      - id: check-added-large-files
        args: [ '--maxkb=3000' ]
      - id: requirements-txt-fixer
      - id: check-yaml
      - id: pretty-format-json
        args: [ '--autofix' ]
      - id: check-merge-conflict


  - repo: https://github.com/psf/black
    rev: 26.1.0
    hooks:
      - id: black
        language_version: python3.14
        types: [ python ]
        exclude: (
          ^pytest_cache
          | ^.env
          | ^pytest.ini
          | ^venv
          | ^requirements.txt
          | ^.idea
          | ^.git
          )
        args: [ "--line-length=79" ]

  - repo: https://github.com/pycqa/flake8
    rev: 7.3.0
    hooks:
      - id: flake8
        additional_dependencies: [ flake8-isort ]
        args: [ "--max-complexity=35",
                "--select=B,C,E,F,W,T4,B9",
                "--ignore=E203,E266,E501,W503,F403,F401,E402" ]
