Revert "Fix writing values with spaces"
This reverts commit c229096916
.
This commit is contained in:
parent
c229096916
commit
43d529876e
1
TODO
1
TODO
@ -1,6 +1,7 @@
|
|||||||
New config TODO
|
New config TODO
|
||||||
===============
|
===============
|
||||||
|
|
||||||
|
- Writing _monospace doesn't work correctly (indented too much?)
|
||||||
- How to handle interpolation correctly? Maybe we really should handle interpolation ourselves?
|
- How to handle interpolation correctly? Maybe we really should handle interpolation ourselves?
|
||||||
Main problem: When re-writing the value, we don't know about the interpolation anymore, so we write the wrong value.
|
Main problem: When re-writing the value, we don't know about the interpolation anymore, so we write the wrong value.
|
||||||
- Tabbing through setting completion does not work
|
- Tabbing through setting completion does not work
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
"""Configuration storage and config-related utilities."""
|
"""Configuration storage and config-related utilities."""
|
||||||
|
|
||||||
import re
|
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import logging
|
import logging
|
||||||
@ -149,11 +148,6 @@ class Config:
|
|||||||
subsequent_indent=' ' * 4,
|
subsequent_indent=' ' * 4,
|
||||||
drop_whitespace=False,
|
drop_whitespace=False,
|
||||||
**self._wrapper_args)
|
**self._wrapper_args)
|
||||||
# Other than the default TextWrapper would, we want to count a word and
|
|
||||||
# the whitespace following it as one chunk, so lines will always be
|
|
||||||
# split *after* whitespace, because whitespace at the beginning of a
|
|
||||||
# line could confuse configparser. Monkeypatching ftw!
|
|
||||||
keyval_wrapper.wordsep_simple_re = re.compile(r'(\S+\s*)')
|
|
||||||
lines = []
|
lines = []
|
||||||
for optname, option in section.items():
|
for optname, option in section.items():
|
||||||
keyval = '{} = {}'.format(optname, option)
|
keyval = '{} = {}'.format(optname, option)
|
||||||
|
Loading…
Reference in New Issue
Block a user