Skip to content

Commit

Permalink
ci: add pre-commit config for airbyte-python-cdk (#270)
Browse files Browse the repository at this point in the history
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Aaron <AJ> Steers <[email protected]>
  • Loading branch information
devin-ai-integration[bot] and aaronsteers authored Jan 29, 2025
1 parent 0b7d976 commit c0ba13f
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
exclude: |
(?x)(
# Python/system files
^.*/__init__\.py$|
^.*?/\.venv/.*$|
^.*?/node_modules/.*$|
^.*?/\.ruff_cache/.*$|
# Package management
^.*?/poetry\.lock$|
^.*?/package-lock\.json$|
^.*?/pnpm-lock\.yaml$|
# Build and test artifacts
^.*?/build/.*$|
^.*?/dist/.*$|
^.*?/\.pytest_cache/.*$|
^.*?/\.coverage$|
^.*?/coverage\.xml$|
^.*?/\.mypy_cache/.*$
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-toml

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.3
hooks:
# Run the linter with repo-defined settings
- id: ruff
args: [--fix]

# Run the formatter with repo-defined settings
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
types_or: [json, yaml]
additional_dependencies:
- [email protected]

- repo: local
hooks:
- id: addlicense
name: Add license headers
entry: addlicense -c "Airbyte, Inc." -l apache -v -f LICENSE_SHORT
language: golang
additional_dependencies: [github.com/google/[email protected]]
files: \.py$
1 change: 1 addition & 0 deletions LICENSE_SHORT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Copyright (c) 2025 Airbyte, Inc., all rights reserved.

0 comments on commit c0ba13f

Please sign in to comment.