File: .pre-commit-config.yaml

package info (click to toggle)
python-actron-neo-api 0.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 340 kB
  • sloc: python: 2,439; makefile: 3
file content (47 lines) | stat: -rw-r--r-- 1,236 bytes parent folder | download
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
repos:
  # Linting and formatting with ruff
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.8.4
    hooks:
      - id: ruff
        args: [--fix]
      - id: ruff-format

  # Basic file hygiene
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-yaml
      - id: check-toml
      - id: check-json
      - id: check-added-large-files
        args: [--maxkb=1000]
      - id: check-merge-conflict
      - id: debug-statements  # Catches leftover pdb, print statements
      - id: mixed-line-ending
        args: [--fix=lf]

  # Type checking with mypy
  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v1.11.2
    hooks:
      - id: mypy
        additional_dependencies: [pydantic>=2.0.0, aiohttp>=3.8.0]
        args: [--config-file=mypy.ini]
        exclude: ^tests/

  # Docstring checking
  - repo: https://github.com/pycqa/pydocstyle
    rev: 6.3.0
    hooks:
      - id: pydocstyle
        args: [--convention=google]
        exclude: ^tests/

  # Sort requirements.txt
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: requirements-txt-fixer