File tree 10 files changed +20
-20
lines changed
10 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:
100
100
# settings.py
101
101
COMPONENTS = {
102
102
" extensions" : [
103
- " djc_ext_pydantic .PydanticExtension" ,
103
+ " djc_pydantic .PydanticExtension" ,
104
104
],
105
105
}
106
106
```
@@ -109,7 +109,7 @@ or by reference:
109
109
110
110
``` python
111
111
# settings.py
112
- from djc_ext_pydantic import PydanticExtension
112
+ from djc_pydantic import PydanticExtension
113
113
114
114
COMPONENTS = {
115
115
" extensions" : [
Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ Homepage = "https://github.com/django-components/djc-ext-pydantic/"
44
44
45
45
[tool .setuptools .packages .find ]
46
46
where = [" src" ]
47
- include = [" djc_ext_pydantic *" ]
48
- exclude = [" djc_ext_pydantic .tests*" ]
47
+ include = [" djc_pydantic *" ]
48
+ exclude = [" djc_pydantic .tests*" ]
49
49
namespaces = false
50
50
51
51
[tool .black ]
@@ -71,7 +71,7 @@ profile = "black"
71
71
line_length = 119
72
72
multi_line_output = 3
73
73
include_trailing_comma = " True"
74
- known_first_party = " djc_ext_pydantic "
74
+ known_first_party = " djc_pydantic "
75
75
76
76
[tool .flake8 ]
77
77
ignore = [' E302' , ' W503' ]
@@ -93,7 +93,7 @@ exclude = [
93
93
]
94
94
95
95
[[tool .mypy .overrides ]]
96
- module = " djc_ext_pydantic .*"
96
+ module = " djc_pydantic .*"
97
97
disallow_untyped_defs = true
98
98
99
99
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 4
4
OnComponentDataContext ,
5
5
)
6
6
7
- from djc_ext_pydantic .validation import get_component_typing , validate_type
7
+ from djc_pydantic .validation import get_component_typing , validate_type
8
8
9
9
10
10
class PydanticExtension (ComponentExtension ):
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 6
6
# from pydantic import ValidationError # TODO: Set more specific error message
7
7
from typing_extensions import TypedDict
8
8
9
- from djc_ext_pydantic .extension import PydanticExtension
9
+ from djc_pydantic .extension import PydanticExtension
10
10
from tests .testutils import setup_test_config
11
11
12
12
setup_test_config ()
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ commands = flake8 .
40
40
41
41
[testenv:isort]
42
42
deps = isort
43
- commands = isort --check-only --diff src/djc_ext_pydantic
43
+ commands = isort --check-only --diff src/djc_pydantic
44
44
45
45
[testenv:coverage]
46
46
deps =
49
49
pytest-asyncio
50
50
syrupy # snapshot testing
51
51
commands =
52
- pytest --cov =djc_ext_pydantic --cov-fail-under =87 --cov-branch
52
+ pytest --cov =djc_pydantic --cov-fail-under =87 --cov-branch
53
53
54
54
[testenv:mypy]
55
55
deps =
@@ -58,4 +58,4 @@ commands = mypy .
58
58
59
59
[testenv:black]
60
60
deps = 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