Skip to content

Commit f44689a

Browse files
committedJul 8, 2024
Add pre-commit configuration
1 parent 3ff9684 commit f44689a

File tree

3 files changed

+148
-1
lines changed

3 files changed

+148
-1
lines changed
 

‎.pre-commit-config.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: check-merge-conflict
6+
- id: check-toml
7+
- id: check-yaml
8+
- id: end-of-file-fixer
9+
- id: trailing-whitespace
10+
args: [--markdown-linebreak-ext=md]
11+
12+
- repo: local
13+
hooks:
14+
- id: ruff-lint
15+
name: ruff linting
16+
description: Run ruff linting
17+
entry: poetry run ruff check --force-exclude
18+
language: system
19+
"types_or": [python, pyi]
20+
require_serial: true
21+
args: [--fix, --exit-non-zero-on-fix]
22+
23+
- id: ruff-format
24+
name: ruff formatting
25+
description: Run ruff formatting
26+
entry: poetry run ruff format --force-exclude
27+
language: system
28+
"types_or": [python, pyi]
29+
require_serial: true

‎poetry.lock

+118-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ sentry-sdk = "^2.7.1"
2222

2323
[tool.poetry.group.dev.dependencies]
2424
ruff = "^0.5.1"
25+
pre-commit = "^3.7.1"
2526

2627
[build-system]
2728
requires = ["poetry>=0.12"]

0 commit comments

Comments
 (0)