-
Notifications
You must be signed in to change notification settings - Fork 26
/
.pre-commit-config.yaml
145 lines (132 loc) · 4.31 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
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
---
ci:
skip: [markdown-link-check]
repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- id: detect-private-key
- id: detect-aws-credentials
args: ["--allow-missing-credentials"]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks
- id: python-no-log-warn
- id: python-check-mock-methods
- id: python-check-blanket-type-ignore
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: forbid-crlf
- id: remove-crlf
- id: forbid-tabs
- id: remove-tabs
- repo: https://github.com/tcort/markdown-link-check
rev: v3.12.2
hooks:
- id: markdown-link-check
args: ["--config=mlc-config.json"]
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
rev: 1.18.0
hooks:
- id: blacken-docs
additional_dependencies: [black==22.3.0]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.5.5'
hooks:
- id: ruff
args: ["--config", "./pyproject.toml"]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
name: Run codespell to check for common misspellings in files
language: python
types: [text]
args: ["--write-changes", "--ignore-words-list", "asend, connexion"]
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
name: Check YAML files with yamllint
entry: yamllint -c yamllint-config.yml --strict
types: [yaml]
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
name: Run pydocstyle
exclude: |
^tests/.*\.py$|
^scripts/.*\.py$|
^dev|
.*example_dags/.*|
additional_dependencies: ['toml']
- repo: https://github.com/PyCQA/bandit
rev: 1.7.9
hooks:
- id: bandit
# Excluding Example DAGs temporarily until they can be fixed
exclude: ^tests/.*\.py$|.*example_dags/.*
args: ["-c", "./pyproject.toml"]
additional_dependencies: [".[toml]"]
- repo: https://github.com/rhysd/actionlint
rev: v1.7.1
hooks:
- id: actionlint
args: ["-ignore", "shellcheck"]
- repo: local
hooks:
- id: sync-all-extras-setup.cfg
name: Sync "all" extra in setup.cfg
language: python
files: ^setup.cfg$
pass_filenames: false
entry: .circleci/scripts/pre_commit_setup_cfg_all_extra.py
- id: sync-version-setup.cfg-docs-conf
name: Sync "version" of the package in setup.cfg and docs/conf.py
language: python
files: ^setup.cfg$|^docs/conf.py$
pass_filenames: false
entry: .circleci/scripts/pre_commit_sync_version_docs.py
- id: sync-version-desc-setup.cfg-package
name: Sync "version" & "description" of the package in setup.cfg and astronomer/providers/package.py
language: python
files: ^setup.cfg$|^astronomer/providers/package.py$
pass_filenames: false
entry: .circleci/scripts/pre_commit_sync_version_desc_package.py
- id: changelog-update
name: Verify changelog is updated when releasing a new version
language: python
files: ^setup.cfg$|^CHANGELOG.rst$
pass_filenames: false
entry: .circleci/scripts/pre_commit_changelog_upto_date.py
additional_dependencies:
- packaging
- id: list-extras-readme
name: List all the extras in README.rst
language: python
files: ^setup.cfg$|^README.rst$
pass_filenames: false
entry: .circleci/scripts/pre_commit_readme_extra.py
- id: check-context-typing-compat
name: Ensure modules use local typing compat for airflow.utils.context.Context
entry: .circleci/scripts/pre_commit_context_typing_compat.py
language: python
pass_filenames: false