@@ -16,20 +16,25 @@ Please take the time to check if it is already in the issue tracker at
16
16
https://github.com/PyCQA/pylint
17
17
18
18
If you cannot find it in the tracker, create a new issue there or discuss your
19
- problem on the
[email protected] mailing list.
19
+ problem on the
[email protected] mailing list
or using the discord server https://discord.gg/kFebW799 .
20
20
21
21
The code-quality mailing list is also a nice place to provide feedback about
22
22
Pylint, since it is shared with other tools that aim at improving the quality of
23
23
python code.
24
24
25
- Note that if you don't find something you have expected in Pylint's
26
- issue tracker, it may be because it is an issue with one of its dependencies, namely
25
+ Note that if you don't find something you have expected in Pylint's issue
26
+ tracker, it may be because it is an issue with one of its dependencies, namely
27
27
astroid:
28
28
29
29
* https://github.com/PyCQA/astroid
30
30
31
31
.. _Mailing lists :
32
32
33
+ Discord server
34
+ --------------
35
+
36
+ https://discord.gg/kFebW799
37
+
33
38
Mailing lists
34
39
-------------
35
40
@@ -62,14 +67,14 @@ your patch gets accepted.
62
67
63
68
- Test your code
64
69
65
- * Pylint is very well tested, with a high good code coverage.
70
+ * Pylint is very well tested, with a high code coverage.
66
71
It has two types of tests, usual unittests and functional tests.
67
72
68
73
The usual unittests can be found under `/pylint/test ` directory and they can
69
74
be used for testing almost anything Pylint related. But for the ease
70
75
of testing Pylint's messages, we also have the concept of functional tests.
71
76
72
- * You should also run all the tests to ensure that your change isn't
77
+ * You should also run all the tests to ensure that your change isn't a
73
78
breaking one. You can run the tests using the tox _ package, as in::
74
79
75
80
python -m tox
@@ -95,15 +100,14 @@ your patch gets accepted.
95
100
96
101
pytest pylint -k test_functional
97
102
98
- * ``pylint `` uses black _ and isort _ Python autoformatter for formatting its code .
99
- We have a pre-commit hook which should take care of the autoformatting for you
100
- for when you are working on a patch . To enable it, do the following:
103
+ * ``pylint `` uses black _ and isort _ among other Python autoformatters .
104
+ We have a pre-commit hook which should take care of the autoformatting for
105
+ you. To enable it, do the following:
101
106
102
107
* install ``pre-commit `` using ``pip install pre-commit ``
103
108
104
109
* then run ``pre-commit install `` in the ``pylint `` root directory to enable the git hooks.
105
110
106
-
107
111
- Add a short entry to the ChangeLog describing the change, except for internal
108
112
implementation only changes. Not usually required, but for changes other than small
109
113
bugs we also add a couple of sentences in the release document for that release,
@@ -112,7 +116,7 @@ your patch gets accepted.
112
116
113
117
- Add a short entry in :file: `doc/whatsnew/VERSION.rst `.
114
118
115
- - Add yourself to the `CONTRIBUTORS ` file, flag youself appropriately
119
+ - Add yourself to the `CONTRIBUTORS ` file, flag yourself appropriately
116
120
(if in doubt, you're a ``contributor ``).
117
121
118
122
- Write a comprehensive commit message
@@ -146,15 +150,11 @@ If multiple messages are expected on the same line, then this syntax can be used
146
150
147
151
a, b, c = 1.test # [unbalanced-tuple-unpacking, no-member]
148
152
149
- The syntax of the .txt file has to be this::
150
-
151
- symbol:line_number:function_or_class:Expected message
152
-
153
- For example, this is a valid message line::
153
+ You can also use ``# +n: [ `` with n an integer if the above syntax would make the line too long or other reasons::
154
154
155
- abstract-class-instantiated:79:main:Abstract class 'BadClass' with abstract methods instantiated
155
+ # +1: [empty-comment]
156
+ #
156
157
157
- If the Python file is expected to not emit any errors, then the .txt file has to be empty.
158
158
If you need special control over Pylint's flag, you can also create a .rc file, which
159
159
can have sections of Pylint's configuration.
160
160
@@ -163,8 +163,8 @@ current environment in order to have faster feedback. Run from Pylint root direc
163
163
164
164
python tests/test_functional.py
165
165
166
- You can use all the options you would use for pytest, for example `-k "test_functional[len_checks]" `.
167
- It is also possible to update the expected output instead of using it for comparison, by appending
166
+ You can use all the options you would use for pytest, for example `-k "test_functional[len_checks]"`.
167
+ If required the .txt file can be re-generated from the current output by appending
168
168
`--update-functional-output ` to the command line::
169
169
170
170
python tests/test_functional.py --update-functional-output -k "test_functional[len_checks]"
@@ -180,7 +180,7 @@ It is also possible to update the expected output instead of using it for compar
180
180
181
181
Tips for Getting Started with Pylint Development
182
182
------------------------------------------------
183
- * Read the :ref: `technical-reference `. It gives a short walkthrough of the pylint
183
+ * Read the :ref: `technical-reference `. It gives a short walk through of the pylint
184
184
codebase and will help you identify where you will need to make changes
185
185
for what you are trying to implement.
186
186
0 commit comments