summaryrefslogtreecommitdiff
path: root/pyflakes/api.py
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2019-01-19 11:52:30 -0800
committerIan Stapleton Cordasco <graffatcolmingov@gmail.com>2019-01-21 08:05:42 -0600
commit14f28ba0279e3547c09b06870f90f01167da08ec (patch)
treeacebb5dd8c6623936edbdda069857f88c5512ce1 /pyflakes/api.py
parent357a2e3cf3461b414ba5a70485a62c411d557c3f (diff)
downloadpyflakes-14f28ba0279e3547c09b06870f90f01167da08ec.tar.gz
Use file_tokens to better match flake8 api
Diffstat (limited to 'pyflakes/api.py')
-rw-r--r--pyflakes/api.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyflakes/api.py b/pyflakes/api.py
index 72d6b6c..6226e5d 100644
--- a/pyflakes/api.py
+++ b/pyflakes/api.py
@@ -70,8 +70,8 @@ def check(codeString, filename, reporter=None):
reporter.unexpectedError(filename, 'problem decoding source')
return 1
# Okay, it's syntactically valid. Now check it.
- tokens = checker.make_tokens(codeString)
- w = checker.Checker(tree, tokens=tokens, filename=filename)
+ file_tokens = checker.make_tokens(codeString)
+ w = checker.Checker(tree, file_tokens=file_tokens, filename=filename)
w.messages.sort(key=lambda m: m.lineno)
for warning in w.messages:
reporter.flake(warning)