Skip to content

Commit

Permalink
feat: sqlfmt (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiasMTS authored Mar 1, 2024
1 parent 663d031 commit 3b29676
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 49 deletions.
102 changes: 53 additions & 49 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,57 @@
# TODO: remove global exclusion of tests when testing overhaul is complete
exclude: "^tests/.*"


default_language_version:
python: python3.8

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-yaml
args: [--unsafe]
- id: check-json
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-case-conflict
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
args:
- "--line-length=99"
- "--target-version=py38"
- id: black
alias: black-check
stages: [manual]
args:
- "--line-length=99"
- "--target-version=py38"
- "--check"
- "--diff"
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
- id: flake8
alias: flake8-check
stages: [manual]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.782
hooks:
- id: mypy
args: [--show-error-codes, --ignore-missing-imports]
files: ^dbt/adapters/.*
language: system
- id: mypy
alias: mypy-check
stages: [manual]
args: [--show-error-codes, --pretty, --ignore-missing-imports]
files: ^dbt/adapters
language: system

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
args: [--unsafe]
- id: check-json
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-case-conflict
- repo: https://github.com/psf/black
rev: 24.2.0
hooks:
- id: black
args:
- "--line-length=99"
- "--target-version=py38"
- id: black
alias: black-check
stages: [manual]
args:
- "--line-length=99"
- "--target-version=py38"
- "--check"
- "--diff"
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
- id: flake8
alias: flake8-check
stages: [manual]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: mypy
args: [--show-error-codes, --ignore-missing-imports]
files: ^dbt/adapters/.*
language: system
- id: mypy
alias: mypy-check
stages: [manual]
args: [--show-error-codes, --pretty, --ignore-missing-imports]
files: ^dbt/adapters
language: system
- repo: https://github.com/tconbeer/sqlfmt
rev: v0.21.2
hooks:
- id: sqlfmt
language_version: python
additional_dependencies: [".[jinjafmt]"]
args:
- "--line-length=120"
- "--fast"
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ pytz
tox>=3.13
twine
wheel
sqlfmt

0 comments on commit 3b29676

Please sign in to comment.