diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2022-07-21 14:25:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-21 14:25:01 +0200 |
commit | 2b0c7ec437f7bf6f25203b589b3ab4fb7b627c0d (patch) | |
tree | 70a953efd475222693b6ad7aca1d4916b570e0c2 | |
parent | 815d417e4776a7bbbdc87fff7d4501d2cca931be (diff) | |
download | pylint-git-2b0c7ec437f7bf6f25203b589b3ab4fb7b627c0d.tar.gz |
[doc] Add the spelling checker in the install guide (#7193)
Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>
-rw-r--r-- | doc/user_guide/checkers/features.rst | 6 | ||||
-rw-r--r-- | doc/user_guide/configuration/all-options.rst | 2 | ||||
-rw-r--r-- | doc/user_guide/installation/command_line_installation.rst | 20 | ||||
-rw-r--r-- | doc/user_guide/installation/index.rst | 8 | ||||
-rw-r--r-- | doc/user_guide/installation/with-multiple-interpreters.rst | 15 | ||||
-rw-r--r-- | doc/user_guide/messages/messages_overview.rst | 1 |
6 files changed, 36 insertions, 16 deletions
diff --git a/doc/user_guide/checkers/features.rst b/doc/user_guide/checkers/features.rst index b532f3476..ad6285f07 100644 --- a/doc/user_guide/checkers/features.rst +++ b/doc/user_guide/checkers/features.rst @@ -420,9 +420,9 @@ Exceptions checker Messages :catching-non-exception (E0712): *Catching an exception which doesn't inherit from Exception: %s* Used when a class which doesn't inherit from Exception is used as an exception in an except clause. -:bad-exception-cause (E0703): *Exception cause set to something which is not an exception, nor None* - Used when using the syntax "raise ... from ...", where the exception cause - is not an exception, nor None. +:bad-exception-cause (E0705): *Exception cause set to something which is not an exception, nor None* + Used when using the syntax "raise ... from ...", where the exception cause is + not an exception, nor None. :notimplemented-raised (E0711): *NotImplemented raised - should raise NotImplementedError* Used when NotImplemented is raised instead of NotImplementedError :raising-bad-type (E0702): *Raising %s while only classes or instances are allowed* diff --git a/doc/user_guide/configuration/all-options.rst b/doc/user_guide/configuration/all-options.rst index 9e7017352..e1ebaca25 100644 --- a/doc/user_guide/configuration/all-options.rst +++ b/doc/user_guide/configuration/all-options.rst @@ -1249,7 +1249,7 @@ Standard Checkers --spelling-dict """"""""""""""" -*Spelling dictionary name. Available dictionaries: none. To make it work, install the 'python-enchant' package.* +*Spelling dictionary name. Available dictionaries: en (aspell), en_AU (aspell), en_CA (aspell), en_GB (aspell), en_US (aspell).* **Default:** ``""`` diff --git a/doc/user_guide/installation/command_line_installation.rst b/doc/user_guide/installation/command_line_installation.rst index e881667ae..6d3aaac1e 100644 --- a/doc/user_guide/installation/command_line_installation.rst +++ b/doc/user_guide/installation/command_line_installation.rst @@ -10,17 +10,19 @@ works with your interpreter. We recommend ``pip``: pip install pylint -Use the newest Python interpreter if you can. +Or if you want to also check spelling with ``enchant`` (you might need to +`install the enchant C library <https://pyenchant.github.io/pyenchant/install.html#installing-the-enchant-c-library>`_): -It's possible to analyse code written for older interpreters by using the ``py-version`` -option and setting it to the old interpreter. For example you can check that there are -no ``f-strings`` in Python 3.5 code using Python 3.8 with an up-to-date pylint even if -Python 3.5 is past end of life (EOL). +.. code-block:: sh + + pip install pylint[spelling] + +The newest pylint supports all Python interpreters that are not past end of life. -We do not guarantee that ``py-version`` will work for all EOL python interpreters indefinitely, -(for anything before python 3.5, it probably won't). If a newer version does not work for you, -the best available pylint might be an old version that works with your old interpreter but -without the bug fixes and features of later versions. +We recommend to use the latest interpreter because we rely on the ``ast`` builtin +module that gets better with each new Python interpreter. For example a Python +3.6 interpreter can't analyse 3.8 syntax (amongst others, because of the new walrus operator) while a 3.8 +interpreter can also deal with Python 3.6. See :ref:`using pylint with multiple interpreters <continuous-integration>` for more details. .. note:: You can also use ``conda`` or your system package manager on debian based OS. diff --git a/doc/user_guide/installation/index.rst b/doc/user_guide/installation/index.rst index 806f74889..c7ec0a8d3 100644 --- a/doc/user_guide/installation/index.rst +++ b/doc/user_guide/installation/index.rst @@ -3,9 +3,10 @@ Installation Pylint can be installed: -- As a command line tool -- Integrated in your editor/ide -- As a pre-commit hook +- :ref:`As a command line tool <installation>` +- :ref:`Integrated in your editor/ide <ide-integration>` +- :ref:`As a pre-commit hook <pre-commit-integration>` +- :ref:`For multiple python interpreters in your continuous integration <continuous-integration>` .. toctree:: :maxdepth: 2 @@ -15,5 +16,6 @@ Pylint can be installed: command_line_installation.rst ide_integration/index pre-commit-integration.rst + with-multiple-interpreters.rst badge upgrading_pylint.rst diff --git a/doc/user_guide/installation/with-multiple-interpreters.rst b/doc/user_guide/installation/with-multiple-interpreters.rst new file mode 100644 index 000000000..b61d29882 --- /dev/null +++ b/doc/user_guide/installation/with-multiple-interpreters.rst @@ -0,0 +1,15 @@ +.. _continuous-integration: + +Installation with multiple interpreters +======================================= + +It's possible to analyse code written for older or multiple interpreters by using +the ``py-version`` option and setting it to the oldest supported interpreter of your code. For example you can check +that there are no ``f-strings`` in Python 3.5 code using Python 3.8 with an up-to-date +pylint even if Python 3.5 is past end of life (EOL) and the version of pylint you use is not +compatible with it. + +We do not guarantee that ``py-version`` will work for all EOL Python interpreters indefinitely, +(for anything before Python 3.5, it probably won't). If a newer version does not work for you, +the best available pylint might be an old version that works with your old interpreter but +without the bug fixes and features of later versions. diff --git a/doc/user_guide/messages/messages_overview.rst b/doc/user_guide/messages/messages_overview.rst index 434770908..558b3f1bf 100644 --- a/doc/user_guide/messages/messages_overview.rst +++ b/doc/user_guide/messages/messages_overview.rst @@ -177,6 +177,7 @@ All renamed messages in the error category: :titlesonly: error/bad-context-manager + error/bad-exception-context error/bad-option-value error/maybe-no-member error/old-non-iterator-returned-2 |