-
Notifications
You must be signed in to change notification settings - Fork 1.1k
(v3.7.0) Python: python
Maintainer: LCD 47 [email protected]
This checker uses Python's builtin compile()
function for detecting syntax errors.
In Python you have the ability to specify a particular codec at the top of
the file with a special comment that looks something like
# coding: spec
.
Python will see this comment at import time and use the corresponding codec
to transform the file before using it. The python
checker has an option
g:syntastic_python_python_use_codec
that will make syntastic aware of such
comments before running compiler checks on the file.
Please note that transforming a file like this affects line numbers and
column numbers, and syntastic has no way to make the necessary adjustments.
Consequently, errors might appear on surprising lines if you enable this
feature and the transformed file has code on different lines than the raw
file. For this reason the use of these transformations should be limitted
to codecs that preserve line numbers, such as the spec
codec provided by
NoseOfYeti.
- g:syntastic_python_python_use_codec (boolean; default: 0)
- Enables handling of
# coding: spec
comments.
The checker needs Python version 2.6 or later.