8000 Merge pull request #1646 from televi/main · PyCQA/flake8@318a86a · GitHub 8000
[go: up one dir, main page]

Skip to content

Commit 318a86a

Browse files
authored
Merge pull request #1646 from televi/main
Clarify entry point naming
2 parents 7160561 + 7b8b374 commit 318a86a

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

docs/source/plugin-development/registering-plugins.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,17 @@ look like::
112112

113113
X101 = flake8_example:ExamplePlugin
114114

115+
In the above case, the entry-point name and the error code produced by your
116+
plugin are the same.
117+
115118
If your plugin reports several error codes that all start with ``X10``, then
116119
it would look like::
117120

118121
X10 = flake8_example:ExamplePlugin
119122

123+
In this casae as well as the following case, your entry-point name acts as
124+
a prefix to the error codes produced by your plugin.
125+
120126
If all of your plugin's error codes start with ``X1`` then it would look
121127
like::
122128

@@ -130,8 +136,12 @@ in the users environment. Selecting an entry point that is already used can
130136
cause plugins to be deactivated without warning!
131137

132138
**Please Note:** Your entry point does not need to be exactly 4 characters
133-
as of |Flake8| 3.0. *Consider using an entry point with 3 letters followed
134-
by 3 numbers (i.e.* ``ABC123`` *).*
139+
as of |Flake8| 3.0. Single letter entry point prefixes (such as the
140+
'X' in the examples above) have caused issues in the past. As such,
141+
please consider using a 2 or 3 character entry point prefix,
142+
i.e., ``ABC`` is better than ``A`` but ``ABCD`` is invalid.
143+
*A 3 letters entry point prefix followed by 3 numbers (i.e.* ``ABC123`` *)
144+
is currently the longest allowed entry point name.*
135145

136146

137147
.. _Entry Points:

0 commit comments

Comments
 (0)
0