mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-12 15:44:17 +00:00
Document how it determines when the plugin is run
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
This commit is contained in:
parent
0b861e31ef
commit
eae68a41f6
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||||
===================
|
===================
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue