aridity 76__tar.gz → 78__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.
- {aridity-76 → aridity-78}/PKG-INFO +2 -2
- {aridity-76 → aridity-78}/README.md +1 -1
- {aridity-76 → aridity-78}/aridity/config.py +1 -1
- {aridity-76 → aridity-78}/aridity/functions.py +6 -3
- {aridity-76 → aridity-78}/aridity/model.py +31 -6
- {aridity-76 → aridity-78}/aridity.egg-info/PKG-INFO +2 -2
- {aridity-76 → aridity-78}/setup.py +1 -1
- {aridity-76 → aridity-78}/aridity/__init__.py +0 -0
- {aridity-76 → aridity-78}/aridity/arid_config.py +0 -0
- {aridity-76 → aridity-78}/aridity/directives.py +0 -0
- {aridity-76 → aridity-78}/aridity/grammar.py +0 -0
- {aridity-76 → aridity-78}/aridity/keyring.py +0 -0
- {aridity-76 → aridity-78}/aridity/processtemplate.py +0 -0
- {aridity-76 → aridity-78}/aridity/repl.py +0 -0
- {aridity-76 → aridity-78}/aridity/resolve.py +0 -0
- {aridity-76 → aridity-78}/aridity/scope.py +0 -0
- {aridity-76 → aridity-78}/aridity/search.py +0 -0
- {aridity-76 → aridity-78}/aridity/stacks.py +0 -0
- {aridity-76 → aridity-78}/aridity/util.py +0 -0
- {aridity-76 → aridity-78}/aridity.egg-info/SOURCES.txt +0 -0
- {aridity-76 → aridity-78}/aridity.egg-info/dependency_links.txt +0 -0
- {aridity-76 → aridity-78}/aridity.egg-info/entry_points.txt +0 -0
- {aridity-76 → aridity-78}/aridity.egg-info/requires.txt +0 -0
- {aridity-76 → aridity-78}/aridity.egg-info/top_level.txt +0 -0
- {aridity-76 → aridity-78}/parabject.py +0 -0
- {aridity-76 → aridity-78}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: aridity
|
|
3
|
-
Version:
|
|
3
|
+
Version: 78
|
|
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
|
|
@@ -604,7 +604,7 @@ Python object in given module with given qualified name. Module may be relative
|
|
|
604
604
|
###### pyres
|
|
605
605
|
|
|
606
606
|
```python
|
|
607
|
-
def pyres(scope, packageresolvable, nameresolvable)
|
|
607
|
+
def pyres(scope, packageresolvable, nameresolvable, encoding=Text('ascii'))
|
|
608
608
|
```
|
|
609
609
|
|
|
610
610
|
Python resource for inclusion with `.` directive.
|
|
@@ -592,7 +592,7 @@ Python object in given module with given qualified name. Module may be relative
|
|
|
592
592
|
###### pyres
|
|
593
593
|
|
|
594
594
|
```python
|
|
595
|
-
def pyres(scope, packageresolvable, nameresolvable)
|
|
595
|
+
def pyres(scope, packageresolvable, nameresolvable, encoding=Text('ascii'))
|
|
596
596
|
```
|
|
597
597
|
|
|
598
598
|
Python resource for inclusion with `.` directive.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from __future__ import division
|
|
2
|
-
from .model import Boolean, Number, Resource, Text, wrap
|
|
2
|
+
from .model import Boolean, Hole, Number, Resource, Text, wrap
|
|
3
3
|
from .util import allfunctions, dotpy, NoSuchPathException, realname
|
|
4
4
|
from importlib import import_module
|
|
5
5
|
from itertools import chain
|
|
@@ -221,9 +221,9 @@ class Functions:
|
|
|
221
221
|
pyobj = getattr(pyobj, name)
|
|
222
222
|
return wrap(pyobj)
|
|
223
223
|
|
|
224
|
-
def pyres(scope, packageresolvable, nameresolvable):
|
|
224
|
+
def pyres(scope, packageresolvable, nameresolvable, encoding = Text('ascii')):
|
|
225
225
|
'Python resource for inclusion with `.` directive.'
|
|
226
|
-
return Resource(packageresolvable.resolve(scope).cat(), nameresolvable.resolve(scope).cat())
|
|
226
|
+
return Resource(packageresolvable.resolve(scope).cat(), nameresolvable.resolve(scope).cat(), encoding.resolve(scope).cat())
|
|
227
227
|
|
|
228
228
|
@realname('\N{NOT SIGN}')
|
|
229
229
|
def not_(scope, resolvable):
|
|
@@ -247,6 +247,9 @@ class Functions:
|
|
|
247
247
|
lines = resolvable.resolve(scope).cat().splitlines(True)
|
|
248
248
|
return Text(''.join(chain(lines[:1], (indent + line for line in lines[1:]))))
|
|
249
249
|
|
|
250
|
+
def hole(scope, resolvable):
|
|
251
|
+
return Hole('', resolvable.resolve(scope).cat())
|
|
252
|
+
|
|
250
253
|
def getimpl(scope, *resolvables, **kwargs):
|
|
251
254
|
return scope.resolved(*(r.resolve(scope).cat() for r in resolvables), **kwargs)
|
|
252
255
|
|
|
@@ -60,12 +60,27 @@ class Concat(Resolvable):
|
|
|
60
60
|
def resolve(self, scope, aslist = False):
|
|
61
61
|
if aslist:
|
|
62
62
|
return List([part.resolve(scope) for part in self.parts if not part.ignorable])
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
buffer = []
|
|
64
|
+
negbuffer = ''
|
|
65
|
+
for part in self.parts:
|
|
66
|
+
obj = part.resolve(scope)
|
|
67
|
+
try:
|
|
68
|
+
negtext = obj.holevalue
|
|
69
|
+
except AttributeError:
|
|
70
|
+
text = obj.cat()
|
|
71
|
+
negtext = ''
|
|
72
|
+
else:
|
|
73
|
+
text = obj.prefix
|
|
74
|
+
k = min(len(negbuffer), len(text))
|
|
75
|
+
if k:
|
|
76
|
+
assert negbuffer[:k] == text[:k]
|
|
77
|
+
negbuffer = negbuffer[k:]
|
|
78
|
+
text = text[k:]
|
|
79
|
+
buffer.append(text)
|
|
80
|
+
self.monitor(text)
|
|
81
|
+
negbuffer += negtext
|
|
82
|
+
buffer = ''.join(buffer)
|
|
83
|
+
return Hole(buffer, negbuffer) if negbuffer else Text(buffer)
|
|
69
84
|
|
|
70
85
|
def unparse(self):
|
|
71
86
|
return ''.join(part.unparse() for part in self.parts)
|
|
@@ -158,6 +173,16 @@ class Text(Cat, BaseScalar):
|
|
|
158
173
|
return o
|
|
159
174
|
return Locator(s)
|
|
160
175
|
|
|
176
|
+
class Hole(BaseScalar):
|
|
177
|
+
|
|
178
|
+
@property
|
|
179
|
+
def scalar(self):
|
|
180
|
+
raise CatNotSupportedException
|
|
181
|
+
|
|
182
|
+
def __init__(self, prefix, holevalue):
|
|
183
|
+
self.prefix = prefix
|
|
184
|
+
self.holevalue = holevalue
|
|
185
|
+
|
|
161
186
|
class Openable:
|
|
162
187
|
|
|
163
188
|
def openable(self, scope):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: aridity
|
|
3
|
-
Version:
|
|
3
|
+
Version: 78
|
|
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
|
|
@@ -604,7 +604,7 @@ Python object in given module with given qualified name. Module may be relative
|
|
|
604
604
|
###### pyres
|
|
605
605
|
|
|
606
606
|
```python
|
|
607
|
-
def pyres(scope, packageresolvable, nameresolvable)
|
|
607
|
+
def pyres(scope, packageresolvable, nameresolvable, encoding=Text('ascii'))
|
|
608
608
|
```
|
|
609
609
|
|
|
610
610
|
Python resource for inclusion with `.` directive.
|
|
@@ -6,7 +6,7 @@ def long_description():
|
|
|
6
6
|
|
|
7
7
|
setup(
|
|
8
8
|
name = 'aridity',
|
|
9
|
-
version = '
|
|
9
|
+
version = '78',
|
|
10
10
|
description = 'DRY config and template system, easily extensible with Python',
|
|
11
11
|
long_description = long_description(),
|
|
12
12
|
long_description_content_type = 'text/markdown',
|
|
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
|