diff options
| author | Fabian Neundorf <CommodoreFabianus@gmx.de> | 2016-08-01 12:06:33 +0000 |
|---|---|---|
| committer | Fabian Neundorf <CommodoreFabianus@gmx.de> | 2016-08-01 14:06:33 +0200 |
| commit | eae68a41f6edf23d0f8d5f04c1b9469d60835135 (patch) | |
| tree | 87dda4fbe633ea7d1c71988bb46fd0da8b7d2ff3 /docs/source/plugin-development | |
| parent | 0b861e31ef16d299e02af4c676f4b8c960e54e40 (diff) | |
| download | flake8-eae68a41f6edf23d0f8d5f04c1b9469d60835135.tar.gz | |
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
Diffstat (limited to 'docs/source/plugin-development')
| -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 =================== |
