Fix lookup of special values

This commit is contained in:
Michael Droettboom 2015-09-16 11:02:36 -04:00
parent 9c19728d2b
commit 08a572086b
1 changed files with 2 additions and 1 deletions

View File

@ -38,7 +38,8 @@ if hasattr(inspect, 'signature'):
sig = inspect.signature(func)
params = list(sig.parameters.values())
if params:
return params[0].kind in (sig.POSITIONAL_ONLY, sig.POSITIONAL_OR_KEYWORD)
return params[0].kind in (params[0].POSITIONAL_ONLY,
params[0].POSITIONAL_OR_KEYWORD)
else:
return False