Skip to content

Commit

Permalink
Add a pre-commit configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtmckee committed Sep 27, 2024
1 parent 1e3c419 commit a8eb7c0
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
ci:
autoupdate_schedule: "quarterly"

default_language_version:
python: "python3.12"

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-added-large-files"
- id: "check-merge-conflict"
- id: "check-yaml"
- id: "end-of-file-fixer"
- id: "mixed-line-ending"
args:
- "--fix=lf"
- id: "trailing-whitespace"

- repo: "https://github.com/asottile/pyupgrade"
rev: "v3.17.0"
hooks:
- id: "pyupgrade"
name: "Enforce Python 3.9+ idioms"
args:
- "--py39-plus"

- repo: "https://github.com/psf/black-pre-commit-mirror"
rev: "24.8.0"
hooks:
- id: "black"

- repo: "https://github.com/pycqa/isort"
rev: "5.13.2"
hooks:
- id: "isort"

- repo: "https://github.com/python-jsonschema/check-jsonschema"
rev: "0.29.2"
hooks:
- id: "check-github-workflows"

- repo: "https://github.com/rhysd/actionlint"
rev: "v1.7.2"
hooks:
- id: "actionlint"
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ requires = ["setuptools","swig"]
build-backend = "setuptools.build_meta"


# isort
# -----

[tool.isort]
profile = "black"


# pydoctor
# --------

Expand Down

0 comments on commit a8eb7c0

Please sign in to comment.