diff options
| author | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-08-05 00:23:40 +0000 |
|---|---|---|
| committer | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-08-05 00:23:40 +0000 |
| commit | 9a4abfbcb47283fa02d22811b001a3b52f2df97a (patch) | |
| tree | 89da71c95f0159b04d133831678f8ba1187f48f1 /docs/source | |
| parent | 7e806824dfb6934228880585a7caf3c7a81aafc9 (diff) | |
| parent | eae68a41f6edf23d0f8d5f04c1b9469d60835135 (diff) | |
| download | flake8-9a4abfbcb47283fa02d22811b001a3b52f2df97a.tar.gz | |
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
Diffstat (limited to 'docs/source')
| -rw-r--r-- | docs/source/plugin-development/plugin-parameters.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/source/plugin-development/plugin-parameters.rst b/docs/source/plugin-development/plugin-parameters.rst index a0e0177..fd644bc 100644 --- a/docs/source/plugin-development/plugin-parameters.rst +++ b/docs/source/plugin-development/plugin-parameters.rst @@ -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 =================== |
