Skip to content

Commit

Permalink
Merge pull request #57 from jorenham/pre-commit
Browse files Browse the repository at this point in the history
configure pre-commit
  • Loading branch information
jorenham authored Oct 8, 2024
2 parents f5b7bde + eed57cd commit 6759f95
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
ci:
autoupdate_branch: "master"
autoupdate_commit_msg: "update pre-commit hooks"
skip:
- markdownlint
- ruff
- ruff-format
- verifytypes
- typetest

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-illegal-windows-names
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- id: detect-private-key
- id: fix-byte-order-marker
- id: forbid-submodules
- id: name-tests-test
args: [--pytest-test-first]
- id: no-commit-to-branch
args: [--branch, master]
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
hooks:
- id: markdownlint

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff
args: [--fix, --show-fixes]
types_or: [python, pyi]
- id: ruff-format
types_or: [python, pyi]

- repo: local
hooks:
- id: verifytypes
name: poe verifytypes
entry: poe verifytypes
language: system
always_run: true
pass_filenames: false
- id: typetest
name: poe typetest
entry: poe typetest
language: system
always_run: true
pass_filenames: false
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ rm -rf

lint = "ruff check"
format = "ruff format"
pre-commit = "pre-commit run --all-files"

_typetest_bpr = "basedpyright typetests"
_typetest_mypy = "mypy --config-file=pyproject.toml typetests"
Expand Down

0 comments on commit 6759f95

Please sign in to comment.