Skip to content

Commit

Permalink
add pre-commit capability
Browse files Browse the repository at this point in the history
  • Loading branch information
lee1043 committed Nov 9, 2024
1 parent 3eb0ed4 commit 36631e9
Show file tree
Hide file tree
Showing 3 changed files with 312 additions and 120 deletions.
41 changes: 41 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Configuration file for `pre-commit` tool.
# Source: https://pre-commit.com/#pre-commit-configyaml---top-level
exclude: "docs|node_modules|migrations|.git|.tox|README.md|sample_setups/(external-setups|jsons)|tests/deprecated"
default_stages: [commit]
fail_fast: true

repos:
# =======================
# General file formatters
# =======================
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: check-yaml

# =======================
# Python code formatters
# =======================
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black

- repo: https://github.com/timothycrosley/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--honor-noqa"]

# =======================
# Python linting
# =======================
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
args: ["--config=setup.cfg"]
additional_dependencies: [flake8-isort]
Loading

0 comments on commit 36631e9

Please sign in to comment.