Skip to content

Commit

Permalink
Merge pull request #173 from ian-r-rose/allow_args_parameter
Browse files Browse the repository at this point in the history
Don't filter out parameters named 'args' or 'kwd' in utils.get_signature().
  • Loading branch information
fonnesbeck authored Jan 18, 2018
2 parents 8733c66 + b69dbfe commit 2b98872
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pymc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@
PY3 = sys.version_info >= (3, 3)

def get_signature_py3(func):
sig = inspect.signature(func)
defaults = tuple(p.default for p in sig.parameters.values() if p.default is not inspect._empty)
args = [k for k in sig.parameters.keys() if k not in ('args', 'kwds')]
(args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults,
annotations) = inspect.getfullargspec(func)
return args, defaults

def get_signature_py2(func):
Expand Down

0 comments on commit 2b98872

Please sign in to comment.