mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-14 00:14:46 +00:00
Merge pull request #1678 from kasium/issue-1676
Document off-by-default feature
This commit is contained in:
commit
a81fdd49f5
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`` *)
|
*A 3 letters entry point prefix followed by 3 numbers (i.e.* ``ABC123`` *)
|
||||||
is currently the longest allowed entry point name.*
|
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:
|
.. _Entry Points:
|
||||||
https://setuptools.readthedocs.io/en/latest/pkg_resources.html#entry-points
|
https://setuptools.readthedocs.io/en/latest/pkg_resources.html#entry-points
|
||||||
|
|
|
||||||
|
|
@ -794,11 +794,13 @@ Options and their Descriptions
|
||||||
flake8-typing-extensions
|
flake8-typing-extensions
|
||||||
|
|
||||||
|
|
||||||
|
.. _option-enable-extensions:
|
||||||
|
|
||||||
.. option:: --enable-extensions=<errors>
|
.. option:: --enable-extensions=<errors>
|
||||||
|
|
||||||
:ref:`Go back to index <top>`
|
: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
|
Plugins to |Flake8| have the option of registering themselves as
|
||||||
off-by-default. These plugins will not be loaded unless enabled by this
|
off-by-default. These plugins will not be loaded unless enabled by this
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue