linter: Assert that `_run()` is called with a buffer

pull/12/head
Adrien Vergé 9 years ago
parent 8c839a20c2
commit 9f99f25db5

@ -94,6 +94,9 @@ def get_syntax_error(buffer):
def _run(buffer, conf):
assert hasattr(buffer, '__getitem__'), \
'_run() argument must be a buffer, not a stream'
# If the document contains a syntax error, save it and yield it at the
# right line
syntax_error = get_syntax_error(buffer)

Loading…
Cancel
Save