File tree Expand file tree Collapse file tree 9 files changed +20
-20
lines changed Expand file tree Collapse file tree 9 files changed +20
-20
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ Then add the extension to your project:
100100# settings.py
101101COMPONENTS = {
102102 " extensions" : [
103- " djc_ext_pydantic .PydanticExtension" ,
103+ " djc_pydantic .PydanticExtension" ,
104104 ],
105105}
106106```
@@ -109,7 +109,7 @@ or by reference:
109109
110110``` python
111111# settings.py
112- from djc_ext_pydantic import PydanticExtension
112+ from djc_pydantic import PydanticExtension
113113
114114COMPONENTS = {
115115 " extensions" : [
Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ Homepage = "https://github.com/django-components/djc-ext-pydantic/"
4444
4545[tool .setuptools .packages .find ]
4646where = [" src" ]
47- include = [" djc_ext_pydantic *" ]
48- exclude = [" djc_ext_pydantic .tests*" ]
47+ include = [" djc_pydantic *" ]
48+ exclude = [" djc_pydantic .tests*" ]
4949namespaces = false
5050
5151[tool .black ]
@@ -71,7 +71,7 @@ profile = "black"
7171line_length = 119
7272multi_line_output = 3
7373include_trailing_comma = " True"
74- known_first_party = " djc_ext_pydantic "
74+ known_first_party = " djc_pydantic "
7575
7676[tool .flake8 ]
7777ignore = [' E302' , ' W503' ]
@@ -93,7 +93,7 @@ exclude = [
9393]
9494
9595[[tool .mypy .overrides ]]
96- module = " djc_ext_pydantic .*"
96+ module = " djc_pydantic .*"
9797disallow_untyped_defs = true
9898
9999
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ from djc_pydantic .monkeypatch import monkeypatch_pydantic_core_schema
2+ from djc_pydantic .extension import PydanticExtension
3+
4+
5+ monkeypatch_pydantic_core_schema ()
6+
7+ __all__ = [
8+ "PydanticExtension" ,
9+ ]
Original file line number Diff line number Diff line change 44 OnComponentDataContext ,
55)
66
7- from djc_ext_pydantic .validation import get_component_typing , validate_type
7+ from djc_pydantic .validation import get_component_typing , validate_type
88
99
1010class PydanticExtension (ComponentExtension ):
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 66# from pydantic import ValidationError # TODO: Set more specific error message
77from typing_extensions import TypedDict
88
9- from djc_ext_pydantic .extension import PydanticExtension
9+ from djc_pydantic .extension import PydanticExtension
1010from tests .testutils import setup_test_config
1111
1212setup_test_config ()
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ commands = flake8 .
4040
4141[testenv:isort]
4242deps = isort
43- commands = isort --check-only --diff src/djc_ext_pydantic
43+ commands = isort --check-only --diff src/djc_pydantic
4444
4545[testenv:coverage]
4646deps =
4949 pytest-asyncio
5050 syrupy # snapshot testing
5151commands =
52- pytest --cov =djc_ext_pydantic --cov-fail-under =87 --cov-branch
52+ pytest --cov =djc_pydantic --cov-fail-under =87 --cov-branch
5353
5454[testenv:mypy]
5555deps =
@@ -58,4 +58,4 @@ commands = mypy .
5858
5959[testenv:black]
6060deps = black
61- commands = black --check src/djc_ext_pydantic
61+ commands = black --check src/djc_pydantic
You can’t perform that action at this time.
0 commit comments