File: .pre-commit-config.yaml

package info (click to toggle)
python-aiorecollect 2023.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 436 kB
  • sloc: python: 281; sh: 41; makefile: 5
file content (153 lines) | stat: -rw-r--r-- 4,933 bytes parent folder | download | duplicates (4)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
---
repos:
  - repo: local
    hooks:
      - id: blacken-docs
        name: â˜•ī¸ Format documentation using black
        language: system
        files: '\.(rst|md|markdown|py|tex)$'
        entry: poetry run blacken-docs
        require_serial: true
      - id: check-ast
        name: 🐍 Checking Python AST
        language: system
        types: [python]
        entry: poetry run check-ast
      - id: check-case-conflict
        name: 🔠 Checking for case conflicts
        language: system
        entry: poetry run check-case-conflict
      - id: check-docstring-first
        name: â„šī¸  Checking docstrings are first
        language: system
        types: [python]
        entry: poetry run check-docstring-first
      - id: check-executables-have-shebangs
        name: 🧐 Checking that executables have shebangs
        language: system
        types: [text, executable]
        entry: poetry run check-executables-have-shebangs
        stages: [commit, push, manual]
      - id: check-json
        name: īŊ› Checking JSON files
        language: system
        types: [json]
        entry: poetry run check-json
      - id: check-merge-conflict
        name: đŸ’Ĩ Checking for merge conflicts
        language: system
        types: [text]
        entry: poetry run check-merge-conflict
      - id: check-symlinks
        name: 🔗 Checking for broken symlinks
        language: system
        types: [symlink]
        entry: poetry run check-symlinks
      - id: check-toml
        name: ✅ Checking TOML files
        language: system
        types: [toml]
        entry: poetry run check-toml
      - id: check-yaml
        name: ✅ Checking YAML files
        language: system
        types: [yaml]
        entry: poetry run check-yaml
      - id: codespell
        name: ✅ Checking code for misspellings
        language: system
        types: [text]
        exclude: ^poetry\.lock$
        entry: poetry run codespell
      - id: debug-statements
        name: đŸĒĩ Checking for debug statements and imports (Python)
        language: system
        types: [python]
        entry: poetry run debug-statement-hook
      - id: detect-private-key
        name: đŸ•ĩī¸  Detecting private keys
        language: system
        types: [text]
        entry: poetry run detect-private-key
      - id: end-of-file-fixer
        name: 🔚 Checking end of files
        language: system
        types: [text]
        entry: poetry run end-of-file-fixer
        stages: [commit, push, manual]
      - id: fix-byte-order-marker
        name: 🚏 Checking UTF-8 byte order marker
        language: system
        types: [text]
        entry: poetry run fix-byte-order-marker
      - id: format
        name: â˜•ī¸ Formatting code using ruff
        language: system
        types: [python]
        entry: poetry run ruff format
      - id: isort
        name: 🔀 Sorting all imports with isort
        language: system
        types: [python]
        entry: poetry run isort
      - id: mypy
        name: 🆎 Performing static type checking using mypy
        language: system
        types: [python]
        entry: poetry run mypy
        require_serial: true
      - id: no-commit-to-branch
        name: 🛑 Checking for commit to protected branch
        language: system
        entry: poetry run no-commit-to-branch
        pass_filenames: false
        always_run: true
        args:
          - --branch=dev
          - --branch=main
      - id: poetry
        name: 📜 Checking pyproject with Poetry
        language: system
        entry: poetry check
        pass_filenames: false
        always_run: true
      - id: pylint
        name: 🌟 Starring code with pylint
        language: system
        types: [python]
        entry: poetry run pylint
      - id: pyupgrade
        name: 🆙 Checking for upgradable syntax with pyupgrade
        language: system
        types: [python]
        entry: poetry run pyupgrade
        args: [--py39-plus, --keep-runtime-typing]
      - id: ruff
        name: 👔 Enforcing style guide with ruff
        language: system
        types: [python]
        entry: poetry run ruff --fix
      - id: trailing-whitespace
        name: ✄  Trimming trailing whitespace
        language: system
        types: [text]
        entry: poetry run trailing-whitespace-fixer
        stages: [commit, push, manual]
      - id: vulture
        name: 🔍 Finding unused Python code with Vulture
        language: system
        types: [python]
        entry: poetry run vulture
        pass_filenames: false
        require_serial: true
      - id: yamllint
        name: 🎗  Checking YAML files with yamllint
        language: system
        types: [yaml]
        entry: poetry run yamllint

  - repo: https://github.com/pre-commit/mirrors-prettier
    rev: "v3.0.0-alpha.4"
    hooks:
      - id: prettier
        name: 💄 Ensuring files are prettier