omdev 0.0.0.dev159__tar.gz → 0.0.0.dev161__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.
- {omdev-0.0.0.dev159/omdev.egg-info → omdev-0.0.0.dev161}/PKG-INFO +2 -2
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/scripts/interp.py +4 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/scripts/pyproject.py +21 -9
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161/omdev.egg-info}/PKG-INFO +2 -2
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev.egg-info/requires.txt +1 -1
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/pyproject.toml +2 -2
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/LICENSE +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/MANIFEST.in +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/README.rst +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/.manifests.json +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/__about__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/amalg/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/amalg/__main__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/amalg/amalg.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/antlr/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/antlr/consts.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/antlr/gen.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/bracepy.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cache/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cache/compute/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cache/compute/cache.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cache/compute/contexts.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cache/compute/currents.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cache/compute/fns.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cache/compute/resolvers.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cache/compute/storage.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cache/compute/types.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cache/data/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cache/data/actions.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cache/data/cache.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cache/data/consts.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cache/data/defaults.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cache/data/manifests.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cache/data/specs.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/_boilerplate.cc +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/_distutils/LICENSE +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/_distutils/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/_distutils/build_ext.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/_distutils/compilers/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/_distutils/compilers/ccompiler.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/_distutils/compilers/options.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/_distutils/compilers/unixccompiler.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/_distutils/dir_util.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/_distutils/errors.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/_distutils/extension.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/_distutils/file_util.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/_distutils/modified.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/_distutils/spawn.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/_distutils/sysconfig.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/_distutils/util.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/_distutils/version.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/build.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/cmake.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/importhook.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/magic.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cexts/scan.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/classdot.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cli/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cli/__main__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cli/_pathhack.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cli/clicli.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cli/install.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cli/main.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cli/managers.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cli/types.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/clipboard/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/clipboard/clipboard.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/clipboard/darwin_cf.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/clipboard/linux_x11.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/cmake.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/findimports.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/git/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/git/revisions.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/git/status.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/git/subtrees.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/imgur.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/interp/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/interp/__main__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/interp/cli.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/interp/inspect.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/interp/providers.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/interp/pyenv.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/interp/resolvers.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/interp/standalone.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/interp/system.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/interp/types.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/magic/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/magic/find.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/magic/magic.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/magic/prepare.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/magic/styles.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/manifests/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/manifests/__main__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/manifests/build.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/manifests/main.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/mypy/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/mypy/debug.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/packaging/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/packaging/marshal.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/packaging/names.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/packaging/requires.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/packaging/specifiers.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/packaging/versions.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/pip.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/precheck/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/precheck/__main__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/precheck/base.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/precheck/git.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/precheck/lite.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/precheck/main.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/precheck/manifests.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/precheck/scripts.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/ptk/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/ptk/apps/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/ptk/apps/ncdu.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/pycharm/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/pycharm/__main__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/pycharm/cli.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/pyproject/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/pyproject/__main__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/pyproject/cexts.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/pyproject/cli.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/pyproject/configs.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/pyproject/pkg.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/pyproject/reqs.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/pyproject/venvs.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/revisions.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/scripts/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/scripts/bumpversion.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/scripts/execrss.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/scripts/exectime.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/scripts/importtrace.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/scripts/slowcat.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/scripts/tmpexec.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/secrets.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tokens.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/toml/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/toml/parser.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/toml/writer.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/cloc.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/doc.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/docker.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/git.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/importscan.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/json/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/json/__main__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/json/cli.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/json/formats.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/json/io.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/json/parsing.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/json/processing.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/json/rendering.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/mkrelimp.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/notebook.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/pawk/__init__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/pawk/__main__.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/pawk/pawk.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/pip.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/prof.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/qr.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/tools/sqlrepl.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev/wheelfile.py +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev.egg-info/SOURCES.txt +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev.egg-info/dependency_links.txt +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev.egg-info/entry_points.txt +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/omdev.egg-info/top_level.txt +0 -0
- {omdev-0.0.0.dev159 → omdev-0.0.0.dev161}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: omdev
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev161
|
|
4
4
|
Summary: omdev
|
|
5
5
|
Author: wrmsr
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -12,7 +12,7 @@ Classifier: Operating System :: OS Independent
|
|
|
12
12
|
Classifier: Operating System :: POSIX
|
|
13
13
|
Requires-Python: >=3.12
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: omlish==0.0.0.
|
|
15
|
+
Requires-Dist: omlish==0.0.0.dev161
|
|
16
16
|
Provides-Extra: all
|
|
17
17
|
Requires-Dist: black~=24.10; extra == "all"
|
|
18
18
|
Requires-Dist: pycparser~=2.22; extra == "all"
|
|
@@ -1086,6 +1086,10 @@ def is_new_type(spec: ta.Any) -> bool:
|
|
|
1086
1086
|
return isinstance(spec, types.FunctionType) and spec.__code__ is ta.NewType.__code__.co_consts[1] # type: ignore # noqa
|
|
1087
1087
|
|
|
1088
1088
|
|
|
1089
|
+
def get_new_type_supertype(spec: ta.Any) -> ta.Any:
|
|
1090
|
+
return spec.__supertype__
|
|
1091
|
+
|
|
1092
|
+
|
|
1089
1093
|
def deep_subclasses(cls: ta.Type[T]) -> ta.Iterator[ta.Type[T]]:
|
|
1090
1094
|
seen = set()
|
|
1091
1095
|
todo = list(reversed(cls.__subclasses__()))
|
|
@@ -2378,6 +2378,10 @@ def is_new_type(spec: ta.Any) -> bool:
|
|
|
2378
2378
|
return isinstance(spec, types.FunctionType) and spec.__code__ is ta.NewType.__code__.co_consts[1] # type: ignore # noqa
|
|
2379
2379
|
|
|
2380
2380
|
|
|
2381
|
+
def get_new_type_supertype(spec: ta.Any) -> ta.Any:
|
|
2382
|
+
return spec.__supertype__
|
|
2383
|
+
|
|
2384
|
+
|
|
2381
2385
|
def deep_subclasses(cls: ta.Type[T]) -> ta.Iterator[ta.Type[T]]:
|
|
2382
2386
|
seen = set()
|
|
2383
2387
|
todo = list(reversed(cls.__subclasses__()))
|
|
@@ -3680,9 +3684,7 @@ class ArgparseCli:
|
|
|
3680
3684
|
"""
|
|
3681
3685
|
TODO:
|
|
3682
3686
|
- pickle stdlib objs? have to pin to 3.8 pickle protocol, will be cross-version
|
|
3683
|
-
- namedtuple
|
|
3684
3687
|
- literals
|
|
3685
|
-
- newtypes?
|
|
3686
3688
|
"""
|
|
3687
3689
|
|
|
3688
3690
|
|
|
@@ -3692,7 +3694,7 @@ TODO:
|
|
|
3692
3694
|
@dc.dataclass(frozen=True)
|
|
3693
3695
|
class ObjMarshalOptions:
|
|
3694
3696
|
raw_bytes: bool = False
|
|
3695
|
-
|
|
3697
|
+
non_strict_fields: bool = False
|
|
3696
3698
|
|
|
3697
3699
|
|
|
3698
3700
|
class ObjMarshaler(abc.ABC):
|
|
@@ -3821,10 +3823,10 @@ class IterableObjMarshaler(ObjMarshaler):
|
|
|
3821
3823
|
|
|
3822
3824
|
|
|
3823
3825
|
@dc.dataclass(frozen=True)
|
|
3824
|
-
class
|
|
3826
|
+
class FieldsObjMarshaler(ObjMarshaler):
|
|
3825
3827
|
ty: type
|
|
3826
3828
|
fs: ta.Mapping[str, ObjMarshaler]
|
|
3827
|
-
|
|
3829
|
+
non_strict: bool = False
|
|
3828
3830
|
|
|
3829
3831
|
def marshal(self, o: ta.Any, ctx: 'ObjMarshalContext') -> ta.Any:
|
|
3830
3832
|
return {
|
|
@@ -3836,7 +3838,7 @@ class DataclassObjMarshaler(ObjMarshaler):
|
|
|
3836
3838
|
return self.ty(**{
|
|
3837
3839
|
k: self.fs[k].unmarshal(v, ctx)
|
|
3838
3840
|
for k, v in o.items()
|
|
3839
|
-
if not (self.
|
|
3841
|
+
if not (self.non_strict or ctx.options.non_strict_fields) or k in self.fs
|
|
3840
3842
|
})
|
|
3841
3843
|
|
|
3842
3844
|
|
|
@@ -3968,7 +3970,7 @@ class ObjMarshalerManager:
|
|
|
3968
3970
|
ty: ta.Any,
|
|
3969
3971
|
rec: ta.Callable[[ta.Any], ObjMarshaler],
|
|
3970
3972
|
*,
|
|
3971
|
-
|
|
3973
|
+
non_strict_fields: bool = False,
|
|
3972
3974
|
) -> ObjMarshaler:
|
|
3973
3975
|
if isinstance(ty, type):
|
|
3974
3976
|
if abc.ABC in ty.__bases__:
|
|
@@ -3990,12 +3992,22 @@ class ObjMarshalerManager:
|
|
|
3990
3992
|
return EnumObjMarshaler(ty)
|
|
3991
3993
|
|
|
3992
3994
|
if dc.is_dataclass(ty):
|
|
3993
|
-
return
|
|
3995
|
+
return FieldsObjMarshaler(
|
|
3994
3996
|
ty,
|
|
3995
3997
|
{f.name: rec(f.type) for f in dc.fields(ty)},
|
|
3996
|
-
|
|
3998
|
+
non_strict=non_strict_fields,
|
|
3999
|
+
)
|
|
4000
|
+
|
|
4001
|
+
if issubclass(ty, tuple) and hasattr(ty, '_fields'):
|
|
4002
|
+
return FieldsObjMarshaler(
|
|
4003
|
+
ty,
|
|
4004
|
+
{p.name: rec(p.annotation) for p in inspect.signature(ty).parameters.values()},
|
|
4005
|
+
non_strict=non_strict_fields,
|
|
3997
4006
|
)
|
|
3998
4007
|
|
|
4008
|
+
if is_new_type(ty):
|
|
4009
|
+
return rec(get_new_type_supertype(ty))
|
|
4010
|
+
|
|
3999
4011
|
if is_generic_alias(ty):
|
|
4000
4012
|
try:
|
|
4001
4013
|
mt = self._generic_mapping_types[ta.get_origin(ty)]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: omdev
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev161
|
|
4
4
|
Summary: omdev
|
|
5
5
|
Author: wrmsr
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -12,7 +12,7 @@ Classifier: Operating System :: OS Independent
|
|
|
12
12
|
Classifier: Operating System :: POSIX
|
|
13
13
|
Requires-Python: >=3.12
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: omlish==0.0.0.
|
|
15
|
+
Requires-Dist: omlish==0.0.0.dev161
|
|
16
16
|
Provides-Extra: all
|
|
17
17
|
Requires-Dist: black~=24.10; extra == "all"
|
|
18
18
|
Requires-Dist: pycparser~=2.22; extra == "all"
|
|
@@ -12,7 +12,7 @@ authors = [
|
|
|
12
12
|
urls = {source = 'https://github.com/wrmsr/omlish'}
|
|
13
13
|
license = {text = 'BSD-3-Clause'}
|
|
14
14
|
requires-python = '>=3.12'
|
|
15
|
-
version = '0.0.0.
|
|
15
|
+
version = '0.0.0.dev161'
|
|
16
16
|
classifiers = [
|
|
17
17
|
'License :: OSI Approved :: BSD License',
|
|
18
18
|
'Development Status :: 2 - Pre-Alpha',
|
|
@@ -22,7 +22,7 @@ classifiers = [
|
|
|
22
22
|
]
|
|
23
23
|
description = 'omdev'
|
|
24
24
|
dependencies = [
|
|
25
|
-
'omlish == 0.0.0.
|
|
25
|
+
'omlish == 0.0.0.dev161',
|
|
26
26
|
]
|
|
27
27
|
|
|
28
28
|
[project.optional-dependencies]
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|