Closed ldjebran closed 7 years ago
The context wrapper customization will also give us the possibility to return the pure result when needed by setting context_wrapper=None
@rochacbruno , @omaciel should I go with this refactoring. If yes, what are the preferences: inject_context or use_context
@ldjebran I think we can have only one argument context_name="foo"
and if this is not None
the context is passed to the funtion as foo=context
.
Go ahead if you want, and fetch before, because I just updated the nailgun settings part.
close issue as done
the context arg of the decorator is too ambiguous, it can have the sense whether to use context as True bool value or used as context name string value to be injected as arg in the called function.
propose to split the args by meaning by refactoring like: two naming options: inject_context or use_context
or
also propose to add a customized context wrapper in the decorator wrapper : rename the _wrapcontext function to _default_contextwrapper and the decorator function became like this