Skip to main content

Add an optional dependency on pydantic

ID
fc0097a
date
2025-03-04 21:03:11+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
49b72b2
message
Add an optional dependency on `pydantic`
changed files
3 files, 14 additions, 2 deletions

Changed files

dev_requirements.in (56) → dev_requirements.in (72)

diff --git a/dev_requirements.in b/dev_requirements.in
index 1d9fecc..18f5bc5 100644
--- a/dev_requirements.in
+++ b/dev_requirements.in
@@ -1,4 +1,4 @@
--e file:.
+-e file:.[validate_types]
 
 build
 interrogate

dev_requirements.txt (1901) → dev_requirements.txt (2080)

diff --git a/dev_requirements.txt b/dev_requirements.txt
index c9563e3..a46ef84 100644
--- a/dev_requirements.txt
+++ b/dev_requirements.txt
@@ -2,6 +2,8 @@
 #    uv pip compile dev_requirements.in --output-file dev_requirements.txt
 -e file:.
     # via -r dev_requirements.in
+annotated-types==0.7.0
+    # via pydantic
 attrs==24.2.0
     # via interrogate
 build==1.2.1
@@ -58,6 +60,10 @@ pluggy==1.5.0
     # via pytest
 py==1.11.0
     # via interrogate
+pydantic==2.10.6
+    # via javascript-data-files
+pydantic-core==2.27.2
+    # via pydantic
 pygments==2.18.0
     # via
     #   readme-renderer
@@ -87,7 +93,10 @@ tabulate==0.9.0
 twine==5.1.1
     # via -r dev_requirements.in
 typing-extensions==4.12.2
-    # via mypy
+    # via
+    #   mypy
+    #   pydantic
+    #   pydantic-core
 urllib3==2.2.2
     # via
     #   requests

pyproject.toml (1269) → pyproject.toml (1332)

diff --git a/pyproject.toml b/pyproject.toml
index c73b6b0..9afa125 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -23,6 +23,9 @@ requires-python = ">=3.12"
 dependencies = []
 dynamic = ["version"]
 
+[project.optional-dependencies]
+validate_types = ["pydantic"]
+
 [project.urls]
 "Homepage" = "https://github.com/alexwlchan/python-js-files"
 "Changelog" = "https://github.com/alexwlchan/python-js-files/blob/main/CHANGELOG.md"