summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDudeNr33 <3929834+DudeNr33@users.noreply.github.com>2021-06-30 19:45:06 +0200
committerGitHub <noreply@github.com>2021-06-30 19:45:06 +0200
commitf10fb70e7b0752d0df938e50cc6c0b7f3b704944 (patch)
tree568426ae1030a844b8aa4ad08ee80d5d75a686a3 /doc
parent5bf3b470b7b1b35a35b998294ef9b83e95c729d8 (diff)
downloadpylint-git-f10fb70e7b0752d0df938e50cc6c0b7f3b704944.tar.gz
Add ``rstcheck`` to pre-commit configuration (#4641)
* Added ``rstcheck`` to pre-commit configuration, and fix errors detected by it
Diffstat (limited to 'doc')
-rw-r--r--doc/how_tos/transform_plugins.rst2
-rw-r--r--doc/tutorial.rst104
-rw-r--r--doc/whatsnew/2.9.rst2
3 files changed, 54 insertions, 54 deletions
diff --git a/doc/how_tos/transform_plugins.rst b/doc/how_tos/transform_plugins.rst
index d62f6e70a..323cacf12 100644
--- a/doc/how_tos/transform_plugins.rst
+++ b/doc/how_tos/transform_plugins.rst
@@ -20,7 +20,7 @@ Example
Let us run Pylint on a module from the Python source: `warnings.py`_ and see what happens:
-.. sourcecode:: bash
+.. sourcecode:: shell
amitdev$ pylint -E Lib/warnings.py
E:297,36: Instance of 'WarningMessage' has no 'message' member (no-member)
diff --git a/doc/tutorial.rst b/doc/tutorial.rst
index 46f6a0fe7..4960f39d9 100644
--- a/doc/tutorial.rst
+++ b/doc/tutorial.rst
@@ -103,31 +103,31 @@ entirety:
.. sourcecode:: python
- 1 #!/usr/bin/env python3
- 2
- 3 import string;
- 4
- 5 shift = 3
- 6 choice = input("would you like to encode or decode?")
- 7 word = input("Please enter text")
- 8 letters = string.ascii_letters + string.punctuation + string.digits
- 9 encoded = ''
- 10 if choice == "encode":
- 11 for letter in word:
- 12 if letter == ' ':
- 13 encoded = encoded + ' '
- 14 else:
- 15 x = letters.index(letter) + shift
- 16 encoded = encoded + letters[x]
- 17 if choice == "decode":
- 18 for letter in word:
- 19 if letter == ' ':
- 20 encoded = encoded + ' '
- 21 else:
- 22 x = letters.index(letter) - shift
- 23 encoded = encoded + letters[x]
- 24
- 25 print(encoded)
+ #!/usr/bin/env python3
+
+ import string;
+
+ shift = 3
+ choice = input("would you like to encode or decode?")
+ word = input("Please enter text")
+ letters = string.ascii_letters + string.punctuation + string.digits
+ encoded = ''
+ if choice == "encode":
+ for letter in word:
+ if letter == ' ':
+ encoded = encoded + ' '
+ else:
+ x = letters.index(letter) + shift
+ encoded = encoded + letters[x]
+ if choice == "decode":
+ for letter in word:
+ if letter == ' ':
+ encoded = encoded + ' '
+ else:
+ x = letters.index(letter) - shift
+ encoded = encoded + letters[x]
+
+ print(encoded)
Let's get started.
@@ -195,33 +195,33 @@ Here is the updated code:
.. sourcecode:: python
- 1 #!/usr/bin/env python3
- 2 """This script prompts a user to enter a message to encode or decode
- 3 using a classic Caesar shift substitution (3 letter shift)"""
- 4
- 5 import string
- 6
- 7 shift = 3
- 8 choice = input("would you like to encode or decode?")
- 9 word = input("Please enter text")
- 10 letters = string.ascii_letters + string.punctuation + string.digits
- 11 encoded = ''
- 12 if choice == "encode":
- 13 for letter in word:
- 14 if letter == ' ':
- 15 encoded = encoded + ' '
- 16 else:
- 17 x = letters.index(letter) + shift
- 18 encoded = encoded + letters[x]
- 19 if choice == "decode":
- 20 for letter in word:
- 21 if letter == ' ':
- 22 encoded = encoded + ' '
- 23 else:
- 24 x = letters.index(letter) - shift
- 25 encoded = encoded + letters[x]
- 26
- 27 print(encoded)
+ #!/usr/bin/env python3
+ """This script prompts a user to enter a message to encode or decode
+ using a classic Caesar shift substitution (3 letter shift)"""
+
+ import string
+
+ shift = 3
+ choice = input("would you like to encode or decode?")
+ word = input("Please enter text")
+ letters = string.ascii_letters + string.punctuation + string.digits
+ encoded = ''
+ if choice == "encode":
+ for letter in word:
+ if letter == ' ':
+ encoded = encoded + ' '
+ else:
+ x = letters.index(letter) + shift
+ encoded = encoded + letters[x]
+ if choice == "decode":
+ for letter in word:
+ if letter == ' ':
+ encoded = encoded + ' '
+ else:
+ x = letters.index(letter) - shift
+ encoded = encoded + letters[x]
+
+ print(encoded)
Here is what happens when we run it:
diff --git a/doc/whatsnew/2.9.rst b/doc/whatsnew/2.9.rst
index 28caf70b2..18bd4507e 100644
--- a/doc/whatsnew/2.9.rst
+++ b/doc/whatsnew/2.9.rst
@@ -19,7 +19,7 @@ new checks optional is a step in that direction. In order to do that we
created an optional code style checker that can be loaded using
``pylint.extensions.code_style`` with the ``load-plugins`` options.
More than ever, if as a veteran you want the most checks you can possibly get,
-[you should check the list of pylint extensions.](http://pylint.pycqa.org/en/latest/technical_reference/extensions.html#optional-pylint-checkers-in-the-extensions-module).
+`you should check the list of pylint extensions. <http://pylint.pycqa.org/en/latest/technical_reference/extensions.html#optional-pylint-checkers-in-the-extensions-module>`_.
New checkers