Skip to content

Commit

Permalink
add precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
aniketmaurya committed Dec 6, 2023
1 parent 74ecd6a commit 1862e93
Showing 1 changed file with 11 additions and 37 deletions.
48 changes: 11 additions & 37 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,13 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-yaml
- id: check-docstring-first
- id: check-toml
- id: check-case-conflict
- id: detect-private-key

- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
name: "Black: The uncompromising Python code formatter"

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
name: "Sort Imports"
args: [ "--profile black" ]

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
Expand All @@ -50,27 +37,14 @@ repos:
- id: pyupgrade
args: [ --py36-plus ]

- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
language_version: python3
exclude: tests/
args:
- -s
- "B404,B602,B603,B607,B101"

- repo: local
hooks:
- id: clean
name: clean
entry: make
args: [ "clean" ]
language: system
pass_filenames: false

- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
hooks:
- id: nbstripout
args: [ "max-size 100k" ]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.7
hooks:
# Run the linter.
- id: ruff
types_or: [ python, pyi, jupyter ]
args: [ --fix ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi, jupyter ]

0 comments on commit 1862e93

Please sign in to comment.