aridity 87__tar.gz → 89__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aridity
3
- Version: 87
3
+ Version: 89
4
4
  Summary: DRY config and template system, easily extensible with Python
5
5
  Home-page: https://pypi.org/project/aridity/
6
6
  Author: foyono
@@ -34,7 +34,8 @@ def _wrappathorstream(pathorstream):
34
34
  class ConfigCtrl:
35
35
  'High level scope API.'
36
36
 
37
- settingsopenable = Locator(Path.home() / '.settings.arid')
37
+ if 'HOME' in os.environ:
38
+ settingsopenable = Locator(Path.home() / '.settings.arid')
38
39
 
39
40
  @classmethod
40
41
  def _of(cls, *args, **kwargs):
@@ -108,6 +108,12 @@ def map_(scope, objsresolvable, *args):
108
108
  result.resolvables.put(k, resolvable.resolve(context(k, v)))
109
109
  return result
110
110
 
111
+ def map1(scope, contextresolvable, resultresolvable):
112
+ from .scope import ScalarScope, Scope
113
+ context = contextresolvable.resolve(scope)
114
+ # FIXME: In scalar context case we need to propagate its resolve context.
115
+ return resultresolvable.resolve(Scope([context, scope]) if hasattr(context, 'resolvables') else ScalarScope([scope], context))
116
+
111
117
  def _flat(scope, listsresolvable):
112
118
  from .scope import Scope
113
119
  s = Scope(islist = True) # XXX: Really no parent?
@@ -211,9 +217,6 @@ def pyres(scope, packageresolvable, nameresolvable, encoding = Text('ascii')):
211
217
  def _not(scope, resolvable):
212
218
  return Boolean(not resolvable.resolve(scope).truth())
213
219
 
214
- def _getfrom(scope, scoperesolvable, *resolvables):
215
- return scoperesolvable.resolve(scope).resolved(*(r.resolve(scope).textvalue for r in resolvables))
216
-
217
220
  def _indentmorelines(scope, resolvable):
218
221
  indent = scope.resolved('indent').textvalue
219
222
  lines = resolvable.resolve(scope).textvalue.splitlines(True)
@@ -265,6 +268,7 @@ def corefunctions():
265
268
  yield 'tomlquote', tomlquote
266
269
  yield 'urlquote', urlquote
267
270
  yield 'map', map_
271
+ yield 'map1', map1
268
272
  yield 'flat', _flat
269
273
  yield 'label', _label
270
274
  yield 'join', join
@@ -283,7 +287,6 @@ def corefunctions():
283
287
  yield 'pyref', pyref
284
288
  yield 'pyres', pyres
285
289
  yield '\N{NOT SIGN}', _not
286
- yield 'getfrom', _getfrom
287
290
  yield 'indentmorelines', _indentmorelines
288
291
  yield 'hole', _hole
289
292
  yield '', getimpl # TODO: Refer to the other one.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aridity
3
- Version: 87
3
+ Version: 89
4
4
  Summary: DRY config and template system, easily extensible with Python
5
5
  Home-page: https://pypi.org/project/aridity/
6
6
  Author: foyono
@@ -49,7 +49,7 @@ class SourceInfo:
49
49
  sourceinfo = SourceInfo('.')
50
50
  setup(
51
51
  name = 'aridity',
52
- version = '87',
52
+ version = '89',
53
53
  description = 'DRY config and template system, easily extensible with Python',
54
54
  url = 'https://pypi.org/project/aridity/',
55
55
  author = 'foyono',
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