Skip to content

Commit c0ba13f

Browse files
ci: add pre-commit config for airbyte-python-cdk (#270)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Aaron <AJ> Steers <[email protected]>
1 parent 0b7d976 commit c0ba13f

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

.pre-commit-config.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
exclude: |
2+
(?x)(
3+
# Python/system files
4+
^.*/__init__\.py$|
5+
^.*?/\.venv/.*$|
6+
^.*?/node_modules/.*$|
7+
^.*?/\.ruff_cache/.*$|
8+
9+
# Package management
10+
^.*?/poetry\.lock$|
11+
^.*?/package-lock\.json$|
12+
^.*?/pnpm-lock\.yaml$|
13+
14+
# Build and test artifacts
15+
^.*?/build/.*$|
16+
^.*?/dist/.*$|
17+
^.*?/\.pytest_cache/.*$|
18+
^.*?/\.coverage$|
19+
^.*?/coverage\.xml$|
20+
^.*?/\.mypy_cache/.*$
21+
)
22+
23+
repos:
24+
- repo: https://github.com/pre-commit/pre-commit-hooks
25+
rev: v4.5.0
26+
hooks:
27+
- id: trailing-whitespace
28+
- id: end-of-file-fixer
29+
- id: check-yaml
30+
- id: check-added-large-files
31+
- id: check-toml
32+
33+
- repo: https://github.com/astral-sh/ruff-pre-commit
34+
rev: v0.8.3
35+
hooks:
36+
# Run the linter with repo-defined settings
37+
- id: ruff
38+
args: [--fix]
39+
40+
# Run the formatter with repo-defined settings
41+
- id: ruff-format
42+
43+
- repo: https://github.com/pre-commit/mirrors-prettier
44+
rev: v3.0.3
45+
hooks:
46+
- id: prettier
47+
types_or: [json, yaml]
48+
additional_dependencies:
49+
50+
51+
- repo: local
52+
hooks:
53+
- id: addlicense
54+
name: Add license headers
55+
entry: addlicense -c "Airbyte, Inc." -l apache -v -f LICENSE_SHORT
56+
language: golang
57+
additional_dependencies: [github.com/google/[email protected]]
58+
files: \.py$

LICENSE_SHORT

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Copyright (c) 2025 Airbyte, Inc., all rights reserved.

0 commit comments

Comments
 (0)