Skip to content

Commit 941f9e3

Browse files
[doc] Remove unwanted quotation in code example for message control
1 parent 8b0d08d commit 941f9e3

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

doc/user_guide/messages/message-control.rst

+36-36
Original file line numberDiff line numberDiff line change
@@ -33,63 +33,63 @@ The pragma controls can disable / enable:
3333

3434
* All the violations on a single line
3535

36-
.. sourcecode:: python
36+
.. sourcecode:: python
3737

38-
a, b = ... # pylint: disable=unbalanced-tuple-unpacking
38+
a, b = ... # pylint: disable=unbalanced-tuple-unpacking
3939

4040
* All the violations on the following line
4141

42-
.. sourcecode:: python
42+
.. sourcecode:: python
4343

44-
# pylint: disable-next=unbalanced-tuple-unpacking
45-
a, b = ...
44+
# pylint: disable-next=unbalanced-tuple-unpacking
45+
a, b = ...
4646

4747
* All the violations in a single scope
4848

49-
.. sourcecode:: python
49+
.. sourcecode:: python
5050

51-
def test():
52-
# Disable all the no-member violations in this function
53-
# pylint: disable=no-member
54-
...
51+
def test():
52+
# Disable all the no-member violations in this function
53+
# pylint: disable=no-member
54+
...
5555

5656
* All the violations in a `block`. For instance, each separate branch of an
5757
``if`` statement is considered a separate block, as in the following example:
5858

59-
.. sourcecode:: python
59+
.. sourcecode:: python
6060

61-
def meth5(self):
62-
# pylint: disable=no-member
63-
# no error
64-
print(self.bla)
65-
if self.blop:
66-
# pylint: enable=no-member
67-
# enable all no-members for this block
68-
print(self.blip)
69-
else:
70-
# This is affected by the scope disable
71-
print(self.blip)
61+
def meth5(self):
62+
# pylint: disable=no-member
63+
# no error
64+
print(self.bla)
65+
if self.blop:
7266
# pylint: enable=no-member
67+
# enable all no-members for this block
68+
print(self.blip)
69+
else:
70+
# This is affected by the scope disable
71+
print(self.blip)
72+
# pylint: enable=no-member
73+
print(self.blip)
74+
if self.blop:
75+
# pylint: disable=no-member
76+
# disable all no-members for this block
77+
print(self.blip)
78+
else:
79+
# This emits a violation
7380
print(self.blip)
74-
if self.blop:
75-
# pylint: disable=no-member
76-
# disable all no-members for this block
77-
print(self.blip)
78-
else:
79-
# This emits a violation
80-
print(self.blip)
8181

8282

8383
* If the violation occurs on a block starting line, then it applies only to that line
8484

85-
.. sourcecode:: python
85+
.. sourcecode:: python
8686

87-
if self.blop: # pylint: disable=no-member; applies only to this line
88-
# Here we get an error
89-
print(self.blip)
90-
else:
91-
# error
92-
print(self.blip)
87+
if self.blop: # pylint: disable=no-member; applies only to this line
88+
# Here we get an error
89+
print(self.blip)
90+
else:
91+
# error
92+
print(self.blip)
9393

9494

9595

0 commit comments

Comments
 (0)