mapres 3.dev12__tar.gz → 3.dev13__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.
- {mapres-3.dev12/src/mapres.egg-info → mapres-3.dev13}/PKG-INFO +1 -1
- {mapres-3.dev12 → mapres-3.dev13}/pyproject.toml +1 -1
- {mapres-3.dev12 → mapres-3.dev13}/src/mapres/datamap.py +1 -1
- {mapres-3.dev12 → mapres-3.dev13}/src/mapres/resolver.py +2 -0
- {mapres-3.dev12 → mapres-3.dev13/src/mapres.egg-info}/PKG-INFO +1 -1
- {mapres-3.dev12 → mapres-3.dev13}/LICENSE +0 -0
- {mapres-3.dev12 → mapres-3.dev13}/README.md +0 -0
- {mapres-3.dev12 → mapres-3.dev13}/setup.cfg +0 -0
- {mapres-3.dev12 → mapres-3.dev13}/src/mapres/__init__.py +0 -0
- {mapres-3.dev12 → mapres-3.dev13}/src/mapres/ast.py +0 -0
- {mapres-3.dev12 → mapres-3.dev13}/src/mapres/cache.py +0 -0
- {mapres-3.dev12 → mapres-3.dev13}/src/mapres/evaluator.py +0 -0
- {mapres-3.dev12 → mapres-3.dev13}/src/mapres/exceptions.py +0 -0
- {mapres-3.dev12 → mapres-3.dev13}/src/mapres/layers.py +0 -0
- {mapres-3.dev12 → mapres-3.dev13}/src/mapres/maps/__init__.py +0 -0
- {mapres-3.dev12 → mapres-3.dev13}/src/mapres/maps/color.py +0 -0
- {mapres-3.dev12 → mapres-3.dev13}/src/mapres/maps/time.py +0 -0
- {mapres-3.dev12 → mapres-3.dev13}/src/mapres/parser.py +0 -0
- {mapres-3.dev12 → mapres-3.dev13}/src/mapres/tokenizer.py +0 -0
- {mapres-3.dev12 → mapres-3.dev13}/src/mapres.egg-info/SOURCES.txt +0 -0
- {mapres-3.dev12 → mapres-3.dev13}/src/mapres.egg-info/dependency_links.txt +0 -0
- {mapres-3.dev12 → mapres-3.dev13}/src/mapres.egg-info/requires.txt +0 -0
- {mapres-3.dev12 → mapres-3.dev13}/src/mapres.egg-info/top_level.txt +0 -0
|
@@ -78,7 +78,7 @@ def datamap(_cls=None, *, syntax=None, mode=None):
|
|
|
78
78
|
cls = type(cls.__name__, (DataMap,), namespace)
|
|
79
79
|
if rules_obj is not None:
|
|
80
80
|
setattr(cls, 'rules', rules_obj)
|
|
81
|
-
return dataclass(frozen=False)(cls)
|
|
81
|
+
return dataclass(frozen=False)(cls)()
|
|
82
82
|
if _cls is not None:
|
|
83
83
|
return wrap(_cls)
|
|
84
84
|
return wrap
|
|
@@ -104,6 +104,8 @@ def setGlobalMaps(maps, *, priority=0):
|
|
|
104
104
|
Register a global map or datamap instance/class/dict.
|
|
105
105
|
Lower priority = earlier lookup.
|
|
106
106
|
"""
|
|
107
|
+
if isinstance(maps, type):
|
|
108
|
+
maps = maps()
|
|
107
109
|
_DEFAULT_RESOLVER.layers.add_layer(maps, priority=priority)
|
|
108
110
|
|
|
109
111
|
def res(text: str, **ctx) -> str:
|
|
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
|