-
Notifications
You must be signed in to change notification settings - Fork 7
/
.pre-commit-config.yaml
executable file
·45 lines (42 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
33
34
35
36
37
38
39
40
41
42
43
44
45
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace # Trim trailing whitespace
- id: check-merge-conflict # Check for files that contain merge conflict strings
- id: check-case-conflict
- id: double-quote-string-fixer # Replace double quoted strings with single quoted strings
- id: end-of-file-fixer # Make sure files end in a newline and only a newline
- id: requirements-txt-fixer # Sort entries in requirements.txt and remove incorrect entry for pkg-resources==0.0.0
- id: fix-encoding-pragma # Remove the coding pragma: # -*- coding: utf-8 -*-
args: [ "--remove" ]
- id: mixed-line-ending # Replace or check mixed line ending
args: [ "--fix=lf" ]
- id: check-ast
name: Check python ast
description: Simply check whether the files parse as valid python.
entry: check-ast
language: python
types: [ python ]
exclude: >
(?x)^(
setup.py
)$
- repo: https://gitee.com/ibopo/pre-commit-hooks
rev: v1.1.9
hooks:
- id: forbid-crlf
- id: remove-crlf
- id: forbid-tabs
- id: remove-tabs
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.9.0
hooks:
- id: reorder-python-imports
- repo: https://github.com/python-poetry/poetry
rev: '1.4.0' # add version here
hooks:
# - id: poetry-check
# - id: poetry-lock
- id: poetry-export
args: ["-f", "requirements.txt", "-o", "requirements.txt", "--without-hashes"]