Skip to content

Commit f64b317

Browse files
TheNamehonzakral
authored andcommitted
Move default value of 'expand__to_dot' to a variable (#499) (#809)
1 parent a455fdd commit f64b317

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

elasticsearch_dsl/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .exceptions import UnknownDslObject, ValidationException
77

88
SKIP_VALUES = ('', None)
9+
EXPAND__TO_DOT=True
910

1011
def _wrap(val, obj_wrapper=None):
1112
if isinstance(val, dict):
@@ -213,7 +214,7 @@ def get_dsl_class(cls, name):
213214
except KeyError:
214215
raise UnknownDslObject('DSL class `%s` does not exist in %s.' % (name, cls._type_name))
215216

216-
def __init__(self, _expand__to_dot=True, **params):
217+
def __init__(self, _expand__to_dot=EXPAND__TO_DOT, **params):
217218
self._params = {}
218219
for pname, pvalue in iteritems(params):
219220
if '__' in pname and _expand__to_dot:

0 commit comments

Comments
 (0)