forked from DataTalksClub/llm-zoomcamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
32 lines (31 loc) · 1.59 KB
/
.pre-commit-config.yaml
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
# https://pre-commit.com/index.html#top_level-default_stages
default_stages: [commit] # All hooks that do not specify any stages are set to `commit` by default
repos:
# Generic Hooks: https://pre-commit.com/hooks.html
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files # Prevent giant files from being committed.
args: ['--maxkb=500'] # default 500kb
- id: check-ast # Simply check whether files parse as valid python.
- id: check-json # Attempts to load all json files to verify syntax.
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: detect-private-key
- id: trailing-whitespace # Trims trailing whitespace.
- id: detect-aws-credentials # fails if no credentials are available
args: [--allow-missing-credentials]
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
- id: mixed-line-ending
args: [--fix=lf] # single control character (\n, ASCII code 10), most universal
# Git converts LF to CRLF when checking out text files & convert CRLF to LF when committing text files.
- id: requirements-txt-fixer # Sorts entries in requirements.txt
- id: check-case-conflict # Check for files with names that would conflict on a case-insensitive filesystem
# - id: check-illegal-windows-names # Check for files that cannot be created on Windows. Doesn't exit (anymore?)
# pyupgrade
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
hooks:
- id: pyupgrade
args: [--py311-plus]