Make settings a global singleton

This commit is contained in:
nvbn
2015-09-06 21:47:12 +03:00
parent 191a2e588d
commit 105d3d8137
8 changed files with 114 additions and 119 deletions
+2 -1
View File
@@ -12,6 +12,7 @@ import re
from pathlib import Path
import pkg_resources
import six
from .types import Settings
DEVNULL = open(os.devnull, 'w')
@@ -70,7 +71,7 @@ def wrap_settings(params):
"""
def _wrap_settings(fn, command, settings):
return fn(command, settings.update(**params))
return fn(command, Settings(settings, **params))
return decorator(_wrap_settings)