mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-29 10:36:53 +00:00
Document off-by-default feature
Add a short section to the plugin development. See #1676
This commit is contained in:
parent
d1939cbafd
commit
e299674866
2 changed files with 9 additions and 1 deletions
|
|
@ -143,6 +143,12 @@ i.e., ``ABC`` is better than ``A`` but ``ABCD`` is invalid.
|
|||
*A 3 letters entry point prefix followed by 3 numbers (i.e.* ``ABC123`` *)
|
||||
is currently the longest allowed entry point name.*
|
||||
|
||||
.. _off-by-default:
|
||||
|
||||
If your plugin is intended to be opt-in, it can set the attribute
|
||||
``off_by_default = True``. Users of your plugin will then need to utilize
|
||||
:ref:`enable-extensions<option-enable-extensions>` with your plugin's entry
|
||||
point.
|
||||
|
||||
.. _Entry Points:
|
||||
https://setuptools.readthedocs.io/en/latest/pkg_resources.html#entry-points
|
||||
|
|
|
|||
|
|
@ -794,11 +794,13 @@ Options and their Descriptions
|
|||
flake8-typing-extensions
|
||||
|
||||
|
||||
.. _option-enable-extensions:
|
||||
|
||||
.. option:: --enable-extensions=<errors>
|
||||
|
||||
:ref:`Go back to index <top>`
|
||||
|
||||
Enable off-by-default extensions.
|
||||
Enable :ref:`off-by-default<off-by-default>` extensions.
|
||||
|
||||
Plugins to |Flake8| have the option of registering themselves as
|
||||
off-by-default. These plugins will not be loaded unless enabled by this
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue