ExcelAlchemy 2.2.2__tar.gz → 2.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/PKG-INFO +1 -1
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/__init__.py +1 -1
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/helper/pydantic.py +12 -2
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/LICENSE +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/README-pypi.md +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/pyproject.toml +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/_primitives/__init__.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/_primitives/constants.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/_primitives/deprecation.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/_primitives/header_models.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/_primitives/identity.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/_primitives/payloads.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/artifacts.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/codecs/__init__.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/codecs/base.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/codecs/boolean.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/codecs/date.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/codecs/date_range.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/codecs/email.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/codecs/money.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/codecs/multi_checkbox.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/codecs/number.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/codecs/number_range.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/codecs/organization.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/codecs/phone_number.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/codecs/radio.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/codecs/staff.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/codecs/string.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/codecs/tree.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/codecs/url.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/config.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/const.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/core/__init__.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/core/abstract.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/core/alchemy.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/core/executor.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/core/headers.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/core/import_session.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/core/rendering.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/core/rows.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/core/schema.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/core/storage.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/core/storage_minio.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/core/storage_protocol.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/core/table.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/core/writer.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/exc.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/exceptions.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/header_models.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/helper/__init__.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/i18n/__init__.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/i18n/messages.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/identity.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/metadata.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/py.typed +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/results.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/__init__.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/abstract.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/alchemy.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/field.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/header.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/identity.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/result.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/value/__init__.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/value/boolean.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/value/date.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/value/date_range.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/value/email.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/value/money.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/value/multi_checkbox.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/value/number.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/value/number_range.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/value/organization.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/value/phone_number.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/value/radio.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/value/staff.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/value/string.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/value/tree.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/types/value/url.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/util/__init__.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/util/converter.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/util/convertor.py +0 -0
- {excelalchemy-2.2.2 → excelalchemy-2.2.3}/src/excelalchemy/util/file.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""A Python Library for Reading and Writing Excel Files"""
|
|
2
2
|
|
|
3
|
-
__version__ = '2.2.
|
|
3
|
+
__version__ = '2.2.3'
|
|
4
4
|
from excelalchemy._primitives.constants import CharacterSet, DataRangeOption, DateFormat, Option
|
|
5
5
|
from excelalchemy._primitives.deprecation import ExcelAlchemyDeprecationWarning
|
|
6
6
|
from excelalchemy._primitives.identity import (
|
|
@@ -15,6 +15,16 @@ from excelalchemy.i18n.messages import message as msg
|
|
|
15
15
|
from excelalchemy.metadata import FieldMetaInfo, extract_declared_field_metadata
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
def _resolve_excel_codec_type(annotation: object) -> type[ExcelFieldCodec]:
|
|
19
|
+
if isinstance(annotation, type):
|
|
20
|
+
if issubclass(annotation, ExcelFieldCodec):
|
|
21
|
+
return annotation
|
|
22
|
+
unsupported = repr(cast(object, annotation))
|
|
23
|
+
else:
|
|
24
|
+
unsupported = str(annotation)
|
|
25
|
+
raise ProgrammaticError(msg(MessageKey.VALUE_TYPE_DECLARATION_UNSUPPORTED, value_type=unsupported))
|
|
26
|
+
|
|
27
|
+
|
|
18
28
|
@dataclass(frozen=True)
|
|
19
29
|
class PydanticFieldAdapter:
|
|
20
30
|
"""Provide a stable view over one Pydantic field."""
|
|
@@ -34,9 +44,9 @@ class PydanticFieldAdapter:
|
|
|
34
44
|
args = [arg for arg in get_args(annotation) if arg is not type(None)]
|
|
35
45
|
if len(args) != 1:
|
|
36
46
|
raise ProgrammaticError(msg(MessageKey.UNSUPPORTED_FIELD_TYPE_DECLARATION, annotation=annotation))
|
|
37
|
-
return
|
|
47
|
+
return _resolve_excel_codec_type(args[0])
|
|
38
48
|
|
|
39
|
-
return
|
|
49
|
+
return _resolve_excel_codec_type(annotation)
|
|
40
50
|
|
|
41
51
|
@property
|
|
42
52
|
def value_type(self) -> type[ExcelFieldCodec]:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|