Merge branch 'specify-required-parameters' into 'master'

Document how it determines when the plugin is run

*Description of changes*

If a plugin's target (constructor or function) doesn't satisfy specific parameters, it'll never be called. This documents what the parameters must contain to be run at all.

*Related to:*  #159

See merge request !110
This commit is contained in:
Ian Cordasco 2016-08-05 00:23:40 +00:00
commit 9a4abfbcb4

View file

@ -54,6 +54,12 @@ which is not supplied as a parameter of
:class:`~flake8.processor.FileProcessor`, which will be a parsed abstract :class:`~flake8.processor.FileProcessor`, which will be a parsed abstract
syntax tree. It is used by plugins like PyFlakes and McCabe. syntax tree. It is used by plugins like PyFlakes and McCabe.
When the plugin is run depends on the first parameter, not counting ``self``.
It can be either ``physical_line``, ``logical_line`` or ``tree``. If the
parameter is ``tree``, it is run once per file, otherwise once per physical
line or logical line respectively. If the plugin is using neither of them it
won't be run at all.
Registering Options Registering Options
=================== ===================