Skip to content
This repository was archived by the owner on Dec 11, 2024. It is now read-only.

Commit 8687516

Browse files
authored
Use pydantic for type validations (#18)
* pre-commit autoupdate * add missing arguments * move flake8 configuration out of pre-commit * pre-commit autoupdate * add pydantic goal * add pydantic dependency * initial commit for pydantic switch to pydantic validation/conversion update doctests update unit tests * mypy/pyright related changes * stubs related changes * allowed pydantic with pylint * add spaces * use static version * pre-commit autoupdate * configure default python * pyproject-fmt changes * final(?) commit for pydantic changes * update stubs * pre-commit autoupdate * add missing dependencies * fix mypy configuration
1 parent f136a85 commit 8687516

25 files changed

Lines changed: 274 additions & 310 deletions

.flake8

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[flake8]
2+
extend-ignore = E203
3+
per-file-ignores =
4+
__init__.py: F401
5+
max-line-length = 99

.pre-commit-config.yaml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,18 @@ repos:
2222
- id: requirements-txt-fixer
2323
- id: trailing-whitespace
2424
- repo: https://github.com/asottile/pyupgrade
25-
rev: v3.3.2
25+
rev: v3.8.0
2626
hooks:
2727
- id: pyupgrade
2828
args:
2929
- --py310-plus
3030
- repo: https://github.com/pycqa/autoflake
31-
rev: v2.1.1
31+
rev: v2.2.0
3232
hooks:
3333
- id: autoflake
34+
args:
35+
- src
36+
pass_filenames: false
3437
- repo: https://github.com/pycqa/isort
3538
rev: 5.12.0
3639
hooks:
@@ -62,18 +65,14 @@ repos:
6265
hooks:
6366
- id: flake8
6467
args:
65-
- --extend-ignore
66-
- E203
67-
- --per-file-ignores
68-
- __init__.py:F401
69-
- --max-line-length
70-
- "99"
7168
- src
7269
pass_filenames: false
7370
- repo: https://github.com/pre-commit/mirrors-mypy
74-
rev: v1.2.0
71+
rev: v1.4.1
7572
hooks:
7673
- id: mypy
74+
additional_dependencies:
75+
- pydantic
7776
pass_filenames: false
7877
stages:
7978
- manual
@@ -89,23 +88,26 @@ repos:
8988
stages:
9089
- manual
9190
- repo: https://github.com/RobertCraigie/pyright-python
92-
rev: v1.1.306
91+
rev: v1.1.316
9392
hooks:
9493
- id: pyright
9594
pass_filenames: false
9695
stages:
9796
- manual
9897
- repo: https://github.com/charliermarsh/ruff-pre-commit
99-
rev: v0.0.265
98+
rev: v0.0.277
10099
hooks:
101100
- id: ruff
101+
args:
102+
- src
103+
pass_filenames: false
102104
- repo: https://github.com/jendrikseipp/vulture
103105
rev: v2.7
104106
hooks:
105107
- id: vulture
106108
pass_filenames: false
107109
- repo: https://github.com/PyCQA/docformatter
108-
rev: v1.6.5
110+
rev: v1.7.3
109111
hooks:
110112
- id: docformatter
111113
additional_dependencies:
@@ -115,7 +117,7 @@ repos:
115117
- src
116118
pass_filenames: false
117119
- repo: https://github.com/adamchainz/blacken-docs
118-
rev: "1.13.0"
120+
rev: "1.14.0"
119121
hooks:
120122
- id: blacken-docs
121123
args:
@@ -140,15 +142,17 @@ repos:
140142
- src
141143
pass_filenames: false
142144
- repo: https://github.com/tox-dev/pyproject-fmt
143-
rev: 0.11.1
145+
rev: 0.13.0
144146
hooks:
145147
- id: pyproject-fmt
146148
- repo: https://github.com/abravalheri/validate-pyproject
147-
rev: v0.12.2
149+
rev: v0.13
148150
hooks:
149151
- id: validate-pyproject
150152
- repo: https://github.com/codespell-project/codespell
151-
rev: v2.2.4
153+
rev: v2.2.5
152154
hooks:
153155
- id: codespell
156+
default_language_version:
157+
python: python3.10
154158
fail_fast: false

0 commit comments

Comments
 (0)