mapres 3.dev24__tar.gz → 3.dev25__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.
Files changed (23) hide show
  1. {mapres-3.dev24/src/mapres.egg-info → mapres-3.dev25}/PKG-INFO +1 -1
  2. {mapres-3.dev24 → mapres-3.dev25}/pyproject.toml +1 -1
  3. {mapres-3.dev24 → mapres-3.dev25}/src/mapres/datamap.py +12 -17
  4. {mapres-3.dev24 → mapres-3.dev25/src/mapres.egg-info}/PKG-INFO +1 -1
  5. {mapres-3.dev24 → mapres-3.dev25}/LICENSE +0 -0
  6. {mapres-3.dev24 → mapres-3.dev25}/README.md +0 -0
  7. {mapres-3.dev24 → mapres-3.dev25}/setup.cfg +0 -0
  8. {mapres-3.dev24 → mapres-3.dev25}/src/mapres/__init__.py +0 -0
  9. {mapres-3.dev24 → mapres-3.dev25}/src/mapres/ast.py +0 -0
  10. {mapres-3.dev24 → mapres-3.dev25}/src/mapres/cache.py +0 -0
  11. {mapres-3.dev24 → mapres-3.dev25}/src/mapres/evaluator.py +0 -0
  12. {mapres-3.dev24 → mapres-3.dev25}/src/mapres/exceptions.py +0 -0
  13. {mapres-3.dev24 → mapres-3.dev25}/src/mapres/layers.py +0 -0
  14. {mapres-3.dev24 → mapres-3.dev25}/src/mapres/maps/__init__.py +0 -0
  15. {mapres-3.dev24 → mapres-3.dev25}/src/mapres/maps/color.py +0 -0
  16. {mapres-3.dev24 → mapres-3.dev25}/src/mapres/maps/time.py +0 -0
  17. {mapres-3.dev24 → mapres-3.dev25}/src/mapres/parser.py +0 -0
  18. {mapres-3.dev24 → mapres-3.dev25}/src/mapres/resolver.py +0 -0
  19. {mapres-3.dev24 → mapres-3.dev25}/src/mapres/tokenizer.py +0 -0
  20. {mapres-3.dev24 → mapres-3.dev25}/src/mapres.egg-info/SOURCES.txt +0 -0
  21. {mapres-3.dev24 → mapres-3.dev25}/src/mapres.egg-info/dependency_links.txt +0 -0
  22. {mapres-3.dev24 → mapres-3.dev25}/src/mapres.egg-info/requires.txt +0 -0
  23. {mapres-3.dev24 → mapres-3.dev25}/src/mapres.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mapres
3
- Version: 3.dev24
3
+ Version: 3.dev25
4
4
  Summary: A powerfull mapping utility
5
5
  Author: iFamished
6
6
  License: MIT
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
7
7
 
8
8
  [project]
9
9
  name = "mapres"
10
- version = "3-dev.24"
10
+ version = "3-dev.25"
11
11
  description = "A powerfull mapping utility"
12
12
  readme = "README.md"
13
13
  requires-python = ">=3.9"
@@ -121,14 +121,6 @@ def datamap(_cls=None, *, syntax=None, mode=None, missing_key=None, recursive=No
121
121
 
122
122
  # syntax-bound decorator factories
123
123
  class _SyntaxFactory:
124
- '''
125
- Allows:
126
- @datamap.angles
127
- @datamap.angles(mode='config')
128
- @datamap.angles.config
129
- @datamap.angles.dynamic
130
- @datamap.angles.callable
131
- '''
132
124
  def __init__(self, syntax_name):
133
125
  self._syntax = syntax_name
134
126
 
@@ -137,17 +129,20 @@ class _SyntaxFactory:
137
129
  return datamap(_cls, syntax=self._syntax)
138
130
  return datamap(syntax=self._syntax, **kwargs)
139
131
 
140
- @property
141
- def config(self):
142
- return datamap(syntax=self._syntax, mode='config')
132
+ def config(self, _cls=None, **kwargs):
133
+ if _cls is not None and isinstance(_cls, type):
134
+ return datamap(_cls, syntax=self._syntax, mode='config')
135
+ return datamap(syntax=self._syntax, mode='config', **kwargs)
143
136
 
144
- @property
145
- def dynamic(self):
146
- return datamap(syntax=self._syntax, mode='dynamic')
137
+ def dynamic(self, _cls=None, **kwargs):
138
+ if _cls is not None and isinstance(_cls, type):
139
+ return datamap(_cls, syntax=self._syntax, mode='dynamic')
140
+ return datamap(syntax=self._syntax, mode='dynamic', **kwargs)
147
141
 
148
- @property
149
- def callable(self):
150
- return datamap(syntax=self._syntax, mode='callable')
142
+ def callable(self, _cls=None, **kwargs):
143
+ if _cls is not None and isinstance(_cls, type):
144
+ return datamap(_cls, syntax=self._syntax, mode='callable')
145
+ return datamap(syntax=self._syntax, mode='callable', **kwargs)
151
146
 
152
147
 
153
148
  datamap.braces = _SyntaxFactory(syntax.braces)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mapres
3
- Version: 3.dev24
3
+ Version: 3.dev25
4
4
  Summary: A powerfull mapping utility
5
5
  Author: iFamished
6
6
  License: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes