You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DBformatter.re doesn't work with double-braces #125
The DBformatter.re method doesn't work with double-braces (i.e., "do not expand this").
This is documented but someone might reasonably expect to, say, include these to allow curly-braces in their configuration files and be surprised by it.
Minimal example to reproduce issue:
importdbprocessing.DBstringsfmtr=dbprocessing.DBstrings.DBformatter()
fmtr.re('{{Y}}') # should return '{Y}'
Error message/Traceback:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jtniehof/.local//lib//python3.6/site-packages/dbprocessing/DBstrings.py", line 93, in re
self.expand_format(format_string, kwargs), *args, **kwargs)
File "/usr/lib/python3.6/string.py", line 190, in format
return self.vformat(format_string, args, kwargs)
File "/usr/lib/python3.6/string.py", line 194, in vformat
result, _ = self._vformat(format_string, args, kwargs, used_args, 2)
File "/usr/lib/python3.6/string.py", line 234, in _vformat
obj, arg_used = self.get_field(field_name, args, kwargs)
File "/usr/lib/python3.6/string.py", line 299, in get_field
obj = self.get_value(first, args, kwargs)
File "/usr/lib/python3.6/string.py", line 256, in get_value
return kwargs[key]
KeyError: 'Y'
OS, Python version, and dependency version information:
Activity