File: .pre-commit-config.yaml

package info (click to toggle)
python-go2rtc-client 0.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 788 kB
  • sloc: python: 1,127; makefile: 3
file content (140 lines) | stat: -rw-r--r-- 3,396 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
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
---
repos:
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.14.10
    hooks:
      - id: ruff
        name: ๐Ÿถ Ruff lint
        args:
          - --fix
          # - --unsafe-fixes

      - id: ruff-format
        name: ๐Ÿถ Ruff format

  - repo: https://github.com/asottile/pyupgrade
    rev: v3.21.2
    hooks:
      - id: pyupgrade
        name: โฌ†๏ธ  Upgrade Python syntax
        args:
          - --py312-plus

  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
      - id: check-added-large-files
        name: ๐Ÿ—œ๏ธ  Check for added large files

      - id: check-ast
        name: ๐Ÿ Check python ast

      - id: check-builtin-literals
        name: ๐Ÿง Check builtin type constructor use

      - id: check-case-conflict
        name: ๐Ÿ”  Check for case conflicts

      - id: check-docstring-first
        name: โ„น๏ธ  Check docstring is first

      - id: check-executables-have-shebangs
        name: ๐Ÿง Check that executables have shebangs

      - id: check-shebang-scripts-are-executable
        name: ๐Ÿง Check that scripts with shebangs are executable

      - id: check-merge-conflict
        name: ๐Ÿ’ฅ Check for merge conflicts

      - id: check-symlinks
        name: ๐Ÿ”— Check for broken symlinks

      - id: check-toml
        name: โœ… Check toml

      - id: check-xml
        name: โœ… Check xml

      - id: check-yaml
        name: โœ… Check yaml

      - id: debug-statements
        name: ๐Ÿ” Debug statements (Python)

      - id: destroyed-symlinks
        name: ๐Ÿ”— Detect destroyed symlinks

      - id: detect-private-key
        name: ๐Ÿ•ต๏ธ  Detect private key

      - id: end-of-file-fixer
        name: โฎ  Fix End of Files

      - id: fix-byte-order-marker
        name: ๐Ÿง Fix utf-8 byte order marker

      - id: name-tests-test
        name: ๐Ÿ”  Python tests naming
        args:
          - --pytest-test-first
        exclude: ^tests/syrupy.py

      - id: no-commit-to-branch
        name: ๐Ÿ›‘ Don't commit to main branch

      - id: trailing-whitespace
        name: โœ„  Trim trailing whitespace

  - repo: https://github.com/rbubley/mirrors-prettier
    rev: v3.7.4
    hooks:
      - id: prettier
        name: ๐Ÿ’„ Ensuring files are prettier
        additional_dependencies:
          - prettier@3.6.2
          - prettier-plugin-sort-json@4.1.1
        exclude_types:
          - python
        exclude: ^uv.lock$

  - repo: https://github.com/adrienverge/yamllint.git
    rev: v1.37.1
    hooks:
      - id: yamllint
        name: ๐ŸŽ—  Check YAML files with yamllint

  - repo: local
    hooks:
      - id: mypy
        name: ๐Ÿ†Ž Static type checking using mypy
        language: system
        types:
          - python
        entry: uv run mypy
        require_serial: true

      - id: prettier
        name: ๐Ÿ’„ Ensuring files are prettier
        language: system
        types:
          - yaml
          - json
          - markdown
        entry: npm run prettier
        pass_filenames: false

      - id: pylint
        name: ๐ŸŒŸ Starring code with pylint
        language: system
        types:
          - python
        entry: uv run pylint

      - id: pytest
        name: ๐Ÿงช Running tests and test coverage with pytest
        language: system
        types:
          - python
        entry: uv run pytest
        pass_filenames: false