# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# -------------------------------------------------------------------------
default_language_version:
  python: python3.8

ci:
  autofix_prs: true
  autoupdate_commit_msg: '[pre-commit.ci] pre-commit suggestions'
  autoupdate_schedule: quarterly
  # submodules: true

repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.1.0
    hooks:
      - id: end-of-file-fixer
        exclude: torch_tb_profiler/static/index.html
      - id: trailing-whitespace
      - id: double-quote-string-fixer

  - repo: https://github.com/pre-commit/mirrors-autopep8
    rev: v1.6.0
    hooks:
      - id: autopep8
        name: Format code
  - repo: https://github.com/PyCQA/flake8
    rev: 4.0.1
    hooks:
      - id: flake8
        args:
          - "--max-line-length=120"
          - "--per-file-ignores=__init__.py:F401 tb_plugin/torch_tb_profiler/io/file.py: F401"
        name: Check PEP8
