Debian Codegraph @

.pre-commit-config.yaml

raw symbols SCIP
1 ---
2 default_language_version:
3 python: python3
4
5 exclude: ^(doc/_static/.*|doc/_themes/.*)$
6 repos:
7
8 - repo: https://github.com/pre-commit/pre-commit-hooks
9 rev: v4.5.0
10 hooks:
11 - id: check-merge-conflict # Check for files that contain merge conflict strings.
12 - id: trailing-whitespace # Trims trailing whitespace.
13 args:
14 - --markdown-linebreak-ext=md
15 - id: mixed-line-ending # Replaces or checks mixed line ending.
16 args:
17 - --fix=lf
18 - id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
19 - id: check-ast # Simply check whether files parse as valid python.
20 - id: check-case-conflict # Check for files with names that would conflict on a
21 # case-insensitive filesystem like MacOS HFS+ or Windows FAT.
22 - id: check-json # Attempts to load all json files to verify syntax.
23 - id: check-symlinks # Checks for symlinks which do not point to anything.
24 - id: debug-statements # Check for debugger imports and py37+ breakpoint() calls in python source.
25 - id: fix-byte-order-marker # removes UTF-8 byte order marker
26 - id: forbid-submodules # forbids any submodules in the repository.
27 - id: fix-encoding-pragma # Remove `# -*- coding: utf-8 -*-` from the top of python files.
28 args:
29 - --remove
30
31 # ----- Code Formatting and Analysis ---------------------------------------------------------->
32 - repo: https://github.com/charliermarsh/ruff-pre-commit
33 rev: "v0.2.0"
34 hooks:
35 - id: ruff
36 args:
37 - --fix
38 exclude: (.pre-commit-hooks/.*|docs/.*)\.py
39
40 - repo: https://github.com/psf/black
41 rev: 24.1.1
42 hooks:
43 - id: black
44 args: [-l 100]
45 exclude: src/saf/version.py
46
47 - repo: https://github.com/asottile/blacken-docs
48 rev: 1.16.0
49 hooks:
50 - id: blacken-docs
51 args: [--skip-errors]
52 files: ^(docs/.*\.rst|.*\.py)$
53 additional_dependencies:
54 - black==24.1.1
55 # <---- Code Formatting and Analysis -----------------------------------------------------------