From 14f28ba0279e3547c09b06870f90f01167da08ec Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Sat, 19 Jan 2019 11:52:30 -0800 Subject: Use file_tokens to better match flake8 api --- pyflakes/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pyflakes/api.py') 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) -- cgit v1.2.1