diff options
author | Ian Lee <IanLee1521@gmail.com> | 2015-11-04 07:54:06 -0800 |
---|---|---|
committer | Ian Lee <IanLee1521@gmail.com> | 2015-11-04 07:54:06 -0800 |
commit | c86685a3fe0ff0b6f813d90677f67a4faf662791 (patch) | |
tree | 6d2157896ec2862779b88e5cf82689e63acc1a21 | |
parent | 72e76ab03bd8ea27196ec6c6aa609c4a9ddd0d38 (diff) | |
parent | eaff751319592db73271408d6ac282e00a1deaf3 (diff) | |
download | pep8-c86685a3fe0ff0b6f813d90677f67a4faf662791.tar.gz |
Merge pull request #456 from jaccarmac/argspec-equivalence
Correct _get_parameters.
-rwxr-xr-x | pep8.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1316,7 +1316,10 @@ _checks = {'physical_line': {}, 'logical_line': {}, 'tree': {}} def _get_parameters(function): if sys.version_info >= (3, 3): - return list(inspect.signature(function).parameters) + return [parameter.name + for parameter + in inspect.signature(function).parameters.values() + if parameter.kind == parameter.POSITIONAL_OR_KEYWORD] else: return inspect.getargspec(function)[0] |