Skip to content

Commit

Permalink
Add .pre-commit-config.yaml (#2042)
Browse files Browse the repository at this point in the history
Runs black, fixes line endings, ...
  • Loading branch information
dweindl authored May 12, 2023
1 parent b2fe23a commit f6f7163
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--allow-multiple-documents]
- id: check-added-large-files

- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
# It is recommended to specify the latest version of Python
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: python3.11
exclude: '^(ThirdParty|models)/'
3 changes: 3 additions & 0 deletions python/sdist/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ requires = [
"cmake-build-extension==0.5.1",
]
build-backend = "setuptools.build_meta"

[tool.black]
line-length = 80

0 comments on commit f6f7163

Please sign in to comment.