Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.

Commit ecb8256

Browse files
committed
Format using pre-commit hooks
1 parent 1b47bfb commit ecb8256

3 files changed

Lines changed: 30 additions & 3 deletions

File tree

.pre-commit-config.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: check-docstring-first
7+
- id: check-json
8+
- id: pretty-format-json
9+
args: [--autofix, --no-sort-keys]
10+
- id: check-added-large-files
11+
- id: check-yaml
12+
- id: debug-statements
13+
- id: end-of-file-fixer
14+
- repo: https://github.com/myint/docformatter
15+
rev: v1.5.1
16+
hooks:
17+
- id: docformatter
18+
args: [--in-place]
19+
- repo: https://github.com/asottile/pyupgrade
20+
rev: v3.3.1
21+
hooks:
22+
- id: pyupgrade
23+
args: [--py38-plus]
24+
- repo: https://github.com/PyCQA/flake8
25+
rev: 6.0.0
26+
hooks:
27+
- id: flake8

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ license-file = LICENSE
66
[options]
77
python_requires = >=3.8
88
packages = find:
9-
install_requires =
9+
install_requires =
1010
Flask>=2.2,<3
1111

1212
[flake8]

src/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33

44
def parse_datetime(date: str) -> datetime:
5-
"""Parse GitHub date to object"""
5+
"""Parse GitHub date to object."""
66
exp = "%Y-%m-%dT%H:%M:%SZ"
77
return datetime.strptime(date, exp)
88

99

1010
def dict_to_logfmt(data: dict) -> str:
11-
"""Convert a dict to logfmt string"""
11+
"""Convert a dict to logfmt string."""
1212
outstr = list()
1313
for k, v in data.items():
1414
if v is None:

0 commit comments

Comments
 (0)