summaryrefslogtreecommitdiff
path: root/doc/user_guide/message-control.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/user_guide/message-control.rst')
-rw-r--r--doc/user_guide/message-control.rst76
1 files changed, 38 insertions, 38 deletions
diff --git a/doc/user_guide/message-control.rst b/doc/user_guide/message-control.rst
index 8321b6642..82a8ec804 100644
--- a/doc/user_guide/message-control.rst
+++ b/doc/user_guide/message-control.rst
@@ -17,11 +17,11 @@ For all of these controls, ``pylint`` accepts the following values:
* Corresponding category of the checks
- * (C) convention related checks
- * (R) refactoring related checks
- * (W) various warnings
- * (E) errors, for probable bugs in the code
- * (F) fatal, if an error occurred which prevented ``pylint`` from doing further processing.
+ * ``C`` convention related checks
+ * ``R`` refactoring related checks
+ * ``W`` various warnings
+ * ``E`` errors, for probable bugs in the code
+ * ``F`` fatal, if an error occurred which prevented ``pylint`` from doing further processing.
* All the checks with ``all``
@@ -35,56 +35,56 @@ The pragma controls can disable / enable:
* All the violations on a single line
-.. sourcecode:: python
+ .. sourcecode:: python
- a, b = ... # pylint: disable=unbalanced-tuple-unpacking
+ a, b = ... # pylint: disable=unbalanced-tuple-unpacking
* All the violations in a single scope
-.. sourcecode:: python
+ .. sourcecode:: python
- def test():
- # Disable all the no-member violations in this function
- # pylint: disable=no-member
- ...
+ def test():
+ # Disable all the no-member violations in this function
+ # pylint: disable=no-member
+ ...
* All the violations in a `block`. For instance, each separate branch of an
``if`` statement is considered a separate block, as in the following example:
-.. sourcecode:: python
+ .. sourcecode:: python
- def meth5(self):
- # pylint: disable=no-member
- # no error
- print(self.bla)
- if self.blop:
- # pylint: enable=no-member
- # disable all no-members for this block
- print(self.blip)
- else:
- # This is affected by the scope disable
- print(self.blip)
- # pylint: enable=no-member
- print(self.blip)
- if self.blop:
+ def meth5(self):
+ # pylint: disable=no-member
+ # no error
+ print(self.bla)
+ if self.blop:
+ # pylint: enable=no-member
+ # disable all no-members for this block
+ print(self.blip)
+ else:
+ # This is affected by the scope disable
+ print(self.blip)
# pylint: enable=no-member
- # disable all no-members for this block
- print(self.blip)
- else:
- # This emits a violation
print(self.blip)
+ if self.blop:
+ # pylint: enable=no-member
+ # disable all no-members for this block
+ print(self.blip)
+ else:
+ # This emits a violation
+ print(self.blip)
* If the violation occurs on a block starting line, then it applies only to that line
-.. sourcecode:: python
+ .. sourcecode:: python
- if self.blop: # pylint: disable=no-member; applies only to this line
- # Here we get an error
- print(self.blip)
- else:
- # error
- print(self.blip)
+ if self.blop: # pylint: disable=no-member; applies only to this line
+ # Here we get an error
+ print(self.blip)
+ else:
+ # error
+ print(self.blip)