Skip to content

Commit

Permalink
feat: add pre-commit hooks
Browse files Browse the repository at this point in the history
Added `ruff` linting and some default warnings and fixes
  • Loading branch information
mjaquiery committed Oct 8, 2024
1 parent 9f96f19 commit 930164d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.9
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ holoviews==1.18.3
matplotlib==3.9.0
datashader==0.16.1

pre-commit==4.0.0

# Filetype readers
galvani == 0.4.1
maya==0.6.1
Expand Down

0 comments on commit 930164d

Please sign in to comment.