Skip to content

Commit 8b9f344

Browse files
authored
add pre-commit hooks (#15)
1 parent 5135de0 commit 8b9f344

File tree

6 files changed

+205
-5
lines changed

6 files changed

+205
-5
lines changed

.github/workflows/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
PACKAGE_DIRECTORY: './database_setup_tools/'
1818
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1919
PUBLISH_REGISTRY_PASSWORD: ${{ secrets.PYPI_TOKEN }}
20-
BRANCH: "main"
20+
BRANCH: "main"

.pre-commit-config.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.4.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- id: check-yaml
10+
- id: check-added-large-files
11+
- id: check-ast
12+
- id: check-builtin-literals
13+
- id: debug-statements
14+
- repo: https://github.com/psf/black
15+
rev: 23.1.0
16+
hooks:
17+
- id: black
18+
language_version: python3.11
19+
- repo: https://github.com/executablebooks/mdformat
20+
rev: 0.7.16
21+
hooks:
22+
- id: mdformat

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
],
55
"python.testing.unittestEnabled": false,
66
"python.testing.pytestEnabled": true,
7-
"[python]": {
8-
"editor.defaultFormatter": "ms-python.black-formatter"
7+
"[python]": {
8+
"editor.defaultFormatter": "ms-python.black-formatter"
99
}
1010
}

database_setup_tools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__='1.1.0'
1+
__version__ = "1.1.0"

poetry.lock

Lines changed: 178 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ pytest = "7.2.0"
2121
httpx = "0.23.1"
2222
mockito = "^1.4.0"
2323
pytest-mockito = "^0.0.4"
24+
pre-commit = "^3.2.1"
2425

2526
[build-system]
2627
requires = ["poetry-core"]

0 commit comments

Comments
 (0)