[settings] Better impl. of Setting class, tests for it and refactor hardcoded settings to use it.

This commit is contained in:
Romain Dorgueil
2017-07-05 12:41:14 +02:00
parent 6ef25deac9
commit 9801c75720
8 changed files with 115 additions and 21 deletions

View File

@ -69,7 +69,7 @@ def _count_counter(self, context):
class PrettyPrinter(Configurable):
def call(self, *args, **kwargs):
formater = self._format_quiet if settings.QUIET else self._format_console
formater = self._format_quiet if settings.QUIET.get() else self._format_console
for i, (item, value) in enumerate(itertools.chain(enumerate(args), kwargs.items())):
print(formater(i, item, value))