summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lee <IanLee1521@gmail.com>2015-11-04 07:54:06 -0800
committerIan Lee <IanLee1521@gmail.com>2015-11-04 07:54:06 -0800
commitc86685a3fe0ff0b6f813d90677f67a4faf662791 (patch)
tree6d2157896ec2862779b88e5cf82689e63acc1a21
parent72e76ab03bd8ea27196ec6c6aa609c4a9ddd0d38 (diff)
parenteaff751319592db73271408d6ac282e00a1deaf3 (diff)
downloadpep8-c86685a3fe0ff0b6f813d90677f67a4faf662791.tar.gz
Merge pull request #456 from jaccarmac/argspec-equivalence
Correct _get_parameters.
-rwxr-xr-xpep8.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pep8.py b/pep8.py
index c22e63e..b1916cc 100755
--- a/pep8.py
+++ b/pep8.py
@@ -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]