mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-31 19:26:52 +00:00
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:
commit
9a4abfbcb4
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
|
||||
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
|
||||
===================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue