summaryrefslogtreecommitdiffstats
path: root/.pre-commit-config.yaml
blob: 513a2cc28ce0aaf90d5e9469fcb2fe89d2ed15b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
files: ^(eos_downloader)/

repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.4.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-added-large-files
      - id: check-merge-conflict

  # - repo: https://github.com/pycqa/isort
  #   rev: 5.12.0
  #   hooks:
  #     - id: isort
  #       name: Check for changes when running isort on all python files

  - repo: https://github.com/psf/black
    rev: 23.7.0
    hooks:
      - id: black
        name: Check for changes when running Black on all python files

  - repo: https://github.com/pycqa/flake8
    rev: 6.0.0
    hooks:
      - id: flake8
        name: Check for PEP8 error on Python files
        args:
          - --config=/dev/null
          - --max-line-length=165

  - repo: local  # as per https://pylint.pycqa.org/en/latest/user_guide/installation/pre-commit-integration.html
    hooks:
      - id: pylint
        entry: pylint
        language: python
        name: Check for Linting error on Python files
        description: This hook runs pylint.
        types: [python]
        args:
          - -rn                # Only display messages
          - -sn                # Don't display the score
          - --rcfile=pylintrc  # Link to config file

  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v1.4.1
    hooks:
      - id: mypy
        args:
          - --config-file=pyproject.toml
        additional_dependencies:
          - "click==8.1.3"
          - "click-help-colors==0.9.1"
          - "pydantic~=2.0"
          - "PyYAML==6.0"
          - "requests>=2.27"
          - "rich~=13.4"
          - types-paramiko
          - types-requests
        files: eos_downloader