Skip to content

Commit

Permalink
Upgrade contribute doc with discord server and fix typoes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Apr 4, 2021
1 parent e6a22d1 commit 3ac8781
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions doc/development_guide/contribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------------

Expand Down Expand Up @@ -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
Expand All @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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.

Expand All @@ -163,8 +163,8 @@ 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
You can use all the options you would use for pytest, for example `-k "test_functional[len_checks]"`.
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]"
Expand All @@ -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.

Expand Down

0 comments on commit 3ac8781

Please sign in to comment.