diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-04-04 11:00:29 +0200 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-04-08 11:04:22 +0200 |
commit | 083c5d263080ea2063e1ddda044ead6deed44c88 (patch) | |
tree | c4aa0676da0a1d156cb827fffd3304e6fb127b2b /doc/development_guide/contribute.rst | |
parent | 8b18d91daab5c3fbf036de77d8e1e21fde0a9e02 (diff) | |
download | pylint-git-083c5d263080ea2063e1ddda044ead6deed44c88.tar.gz |
Upgrade contribute doc with discord server and fix typoes
Diffstat (limited to 'doc/development_guide/contribute.rst')
-rw-r--r-- | doc/development_guide/contribute.rst | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/doc/development_guide/contribute.rst b/doc/development_guide/contribute.rst index f82bc442c..360449f53 100644 --- a/doc/development_guide/contribute.rst +++ b/doc/development_guide/contribute.rst @@ -16,20 +16,25 @@ Please take the time to check if it is already in the issue tracker at https://github.com/PyCQA/pylint If you cannot find it in the tracker, create a new issue there or discuss your -problem on the code-quality@python.org mailing list. +problem on the code-quality@python.org mailing list or using the discord server https://discord.gg/kFebW799. The code-quality mailing list is also a nice place to provide feedback about Pylint, since it is shared with other tools that aim at improving the quality of python code. -Note that if you don't find something you have expected in Pylint's -issue tracker, it may be because it is an issue with one of its dependencies, namely +Note that if you don't find something you have expected in Pylint's issue +tracker, it may be because it is an issue with one of its dependencies, namely astroid: * https://github.com/PyCQA/astroid .. _Mailing lists: +Discord server +-------------- + +https://discord.gg/kFebW799 + Mailing lists ------------- @@ -62,14 +67,14 @@ your patch gets accepted. - Test your code - * Pylint is very well tested, with a high good code coverage. + * Pylint is very well tested, with a high code coverage. It has two types of tests, usual unittests and functional tests. The usual unittests can be found under `/pylint/test` directory and they can be used for testing almost anything Pylint related. But for the ease of testing Pylint's messages, we also have the concept of functional tests. - * You should also run all the tests to ensure that your change isn't + * You should also run all the tests to ensure that your change isn't a breaking one. You can run the tests using the tox_ package, as in:: python -m tox @@ -95,15 +100,14 @@ your patch gets accepted. pytest pylint -k test_functional - * ``pylint`` uses black_ and isort_ Python autoformatter for formatting its code. - We have a pre-commit hook which should take care of the autoformatting for you - for when you are working on a patch. To enable it, do the following: + * ``pylint`` uses black_ and isort_ among other Python autoformatters. + We have a pre-commit hook which should take care of the autoformatting for + you. To enable it, do the following: * install ``pre-commit`` using ``pip install pre-commit`` * then run ``pre-commit install`` in the ``pylint`` root directory to enable the git hooks. - - Add a short entry to the ChangeLog describing the change, except for internal implementation only changes. Not usually required, but for changes other than small bugs we also add a couple of sentences in the release document for that release, @@ -112,7 +116,7 @@ your patch gets accepted. - Add a short entry in :file:`doc/whatsnew/VERSION.rst`. -- Add yourself to the `CONTRIBUTORS` file, flag youself appropriately +- Add yourself to the `CONTRIBUTORS` file, flag yourself appropriately (if in doubt, you're a ``contributor``). - Write a comprehensive commit message @@ -146,15 +150,11 @@ If multiple messages are expected on the same line, then this syntax can be used a, b, c = 1.test # [unbalanced-tuple-unpacking, no-member] -The syntax of the .txt file has to be this:: - - symbol:line_number:function_or_class:Expected message - -For example, this is a valid message line:: +You can also use ``# +n: [`` with n an integer if the above syntax would make the line too long or other reasons:: - abstract-class-instantiated:79:main:Abstract class 'BadClass' with abstract methods instantiated + # +1: [empty-comment] + # -If the Python file is expected to not emit any errors, then the .txt file has to be empty. If you need special control over Pylint's flag, you can also create a .rc file, which can have sections of Pylint's configuration. @@ -164,7 +164,7 @@ current environment in order to have faster feedback. Run from Pylint root direc python tests/test_functional.py You can use all the options you would use for pytest, for example `-k "test_functional[len_checks]"`. -It is also possible to update the expected output instead of using it for comparison, by appending +If required the .txt file can be re-generated from the current output by appending `--update-functional-output` to the command line:: 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 Tips for Getting Started with Pylint Development ------------------------------------------------ -* Read the :ref:`technical-reference`. It gives a short walkthrough of the pylint +* Read the :ref:`technical-reference`. It gives a short walk through of the pylint codebase and will help you identify where you will need to make changes for what you are trying to implement. |