Skip to content

Commit

Permalink
Use pydantic for type validations (#18)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
yarnabrina authored Jul 8, 2023
1 parent f136a85 commit 8687516
Show file tree
Hide file tree
Showing 25 changed files with 274 additions and 310 deletions.
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
extend-ignore = E203
per-file-ignores =
__init__.py: F401
max-line-length = 99
36 changes: 20 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.2
rev: v3.8.0
hooks:
- id: pyupgrade
args:
- --py310-plus
- repo: https://github.com/pycqa/autoflake
rev: v2.1.1
rev: v2.2.0
hooks:
- id: autoflake
args:
- src
pass_filenames: false
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
Expand Down Expand Up @@ -62,18 +65,14 @@ repos:
hooks:
- id: flake8
args:
- --extend-ignore
- E203
- --per-file-ignores
- __init__.py:F401
- --max-line-length
- "99"
- src
pass_filenames: false
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.2.0
rev: v1.4.1
hooks:
- id: mypy
additional_dependencies:
- pydantic
pass_filenames: false
stages:
- manual
Expand All @@ -89,23 +88,26 @@ repos:
stages:
- manual
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.306
rev: v1.1.316
hooks:
- id: pyright
pass_filenames: false
stages:
- manual
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.265
rev: v0.0.277
hooks:
- id: ruff
args:
- src
pass_filenames: false
- repo: https://github.com/jendrikseipp/vulture
rev: v2.7
hooks:
- id: vulture
pass_filenames: false
- repo: https://github.com/PyCQA/docformatter
rev: v1.6.5
rev: v1.7.3
hooks:
- id: docformatter
additional_dependencies:
Expand All @@ -115,7 +117,7 @@ repos:
- src
pass_filenames: false
- repo: https://github.com/adamchainz/blacken-docs
rev: "1.13.0"
rev: "1.14.0"
hooks:
- id: blacken-docs
args:
Expand All @@ -140,15 +142,17 @@ repos:
- src
pass_filenames: false
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 0.11.1
rev: 0.13.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.12.2
rev: v0.13
hooks:
- id: validate-pyproject
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
rev: v2.2.5
hooks:
- id: codespell
default_language_version:
python: python3.10
fail_fast: false
Loading

0 comments on commit 8687516

Please sign in to comment.