Skip to content

Commit c58b202

Browse files
committed
ci: add pre-commit configuration
1 parent 3486638 commit c58b202

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.pre-commit-config.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# See https://pre-commit.com for more information
2+
repos:
3+
- repo: local
4+
hooks:
5+
- id: black
6+
name: black
7+
language: system
8+
entry: black --check --diff
9+
files: \.py[i]?$
10+
11+
- id: codespell
12+
name: codespell
13+
language: system
14+
entry: codespell
15+
16+
- id: flake8
17+
name: flake8
18+
language: system
19+
entry: flake8
20+
files: \.py$
21+
22+
- id: mypy
23+
name: mypy
24+
language: system
25+
entry: mypy --pretty
26+
files: \.py[i]?$

psycopg/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ dev = [
8484
"dnspython >= 2.1",
8585
"flake8 >= 4.0",
8686
"mypy >= 1.14",
87+
"pre-commit >= 4.0.1",
8788
"types-setuptools >= 57.4",
8889
"wheel >= 0.37",
8990
]

0 commit comments

Comments
 (0)