summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@google.com>2014-07-24 18:29:58 +0200
committerDmitry Jemerov <yole@google.com>2014-07-24 18:29:58 +0200
commit1ee296bca0fa611d3dbe87c5c5c8009e448d2556 (patch)
tree4df955c343dc3726a06f0a023f82249ded91d362 /docs
parent4c5bf00cb613be617c7f48d3b2b82a1c7b895ac1 (diff)
downloadpep8-1ee296bca0fa611d3dbe87c5c5c8009e448d2556.tar.gz
Report E402 for imports not on top of file; issue #264. Also add ability to keep local state for each checker plugin. #ep14boat
Diffstat (limited to 'docs')
-rw-r--r--docs/developer.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/developer.rst b/docs/developer.rst
index 7df1734..4725acd 100644
--- a/docs/developer.rst
+++ b/docs/developer.rst
@@ -59,6 +59,12 @@ additional information with extra arguments. All attributes of the
* ``previous_indent_level``: indentation on previous line
* ``previous_logical``: previous logical line
+Check plugins can also maintain per-file state. If you need this, declare
+a parameter named ``checker_state``. You will be passed a dict, which will be
+the same one for all lines in the same file but a different one for different
+files. Each check plugin gets its own dict, so you don't need to worry about
+clobbering the state of other plugins.
+
The docstring of each check function shall be the relevant part of
text from `PEP 8`_. It is printed if the user enables ``--show-pep8``.
Several docstrings contain examples directly from the `PEP 8`_ document.