Files
datamodel-code-generator/datamodel_code_generator/model/improts.py
Koudai Aono 35b892ce75 Support TypedDict as output type (#1309)
* Support TypedDict as output type

* Addd unittest

* Fix lint

* Support functional typeddict

* Add unittest

* Update unittest

* Add comment

* Update documents

* Improve typedDict keys

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix unittest

* Fix unittest

* Fix lint

* Fix unittest

* Fix unittest

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-06-01 00:24:23 +09:00

9 lines
473 B
Python

from datamodel_code_generator.imports import Import
IMPORT_DATACLASS = Import.from_full_path('dataclasses.dataclass')
IMPORT_FIELD = Import.from_full_path('dataclasses.field')
IMPORT_TYPED_DICT = Import.from_full_path('typing.TypedDict')
IMPORT_TYPED_DICT_BACKPORT = Import.from_full_path('typing_extensions.TypedDict')
IMPORT_NOT_REQUIRED = Import.from_full_path('typing.NotRequired')
IMPORT_NOT_REQUIRED_BACKPORT = Import.from_full_path('typing_extensions.NotRequired')