Skip to content

Commit

Permalink
DEV: use pre-commit and ruff to improve Python style (#574)
Browse files Browse the repository at this point in the history
* DEV: add pre-commit and use ruff

Signed-off-by: Weh Andreas <[email protected]>

* MAINT: fix lint warnings for _ebm

Signed-off-by: Weh Andreas <[email protected]>

---------

Signed-off-by: Weh Andreas <[email protected]>
  • Loading branch information
DerWeh authored Sep 30, 2024
1 parent bc823be commit 0ad0093
Show file tree
Hide file tree
Showing 3 changed files with 366 additions and 278 deletions.
32 changes: 32 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.6.0"
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.6.7"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: "v2.3.0"
hooks:
- id: codespell
args: ["-L", "sur,nd"]
- repo: local
hooks:
- id: disallow-caps
name: Disallow improper capitalization
language: pygrep
entry: PyBind|Numpy|Cmake|CCache|Github|PyTest
exclude: .pre-commit-config.yaml
Loading

0 comments on commit 0ad0093

Please sign in to comment.