summaryrefslogtreecommitdiff
path: root/doc/data/messages/m
diff options
context:
space:
mode:
Diffstat (limited to 'doc/data/messages/m')
-rw-r--r--doc/data/messages/m/magic-value-comparison/bad.py4
-rw-r--r--doc/data/messages/m/misplaced-format-function/bad.py2
-rw-r--r--doc/data/messages/m/misplaced-format-function/good.py2
-rw-r--r--doc/data/messages/m/missing-any-param-doc/bad.py2
-rw-r--r--doc/data/messages/m/missing-any-param-doc/good.py4
-rw-r--r--doc/data/messages/m/missing-class-docstring/bad.py1
-rw-r--r--doc/data/messages/m/missing-final-newline/good.py2
-rw-r--r--doc/data/messages/m/missing-kwoa/bad.py3
-rw-r--r--doc/data/messages/m/missing-kwoa/good.py1
-rw-r--r--doc/data/messages/m/missing-parentheses-for-call-in-test/bad.py1
-rw-r--r--doc/data/messages/m/missing-parentheses-for-call-in-test/good.py1
-rw-r--r--doc/data/messages/m/missing-raises-doc/bad.py2
-rw-r--r--doc/data/messages/m/missing-raises-doc/good.py2
13 files changed, 15 insertions, 12 deletions
diff --git a/doc/data/messages/m/magic-value-comparison/bad.py b/doc/data/messages/m/magic-value-comparison/bad.py
index 536659abe..eef9e5d27 100644
--- a/doc/data/messages/m/magic-value-comparison/bad.py
+++ b/doc/data/messages/m/magic-value-comparison/bad.py
@@ -3,8 +3,8 @@ import random
measurement = random.randint(0, 200)
above_threshold = False
i = 0
-while i < 5: # [magic-value-comparison]
- above_threshold = measurement > 100 # [magic-value-comparison]
+while i < 5: # [magic-value-comparison]
+ above_threshold = measurement > 100 # [magic-value-comparison]
if above_threshold:
break
measurement = random.randint(0, 200)
diff --git a/doc/data/messages/m/misplaced-format-function/bad.py b/doc/data/messages/m/misplaced-format-function/bad.py
index 0bd172369..bc40bba4d 100644
--- a/doc/data/messages/m/misplaced-format-function/bad.py
+++ b/doc/data/messages/m/misplaced-format-function/bad.py
@@ -1 +1 @@
-print('Value: {}').format('Car') # [misplaced-format-function]
+print("Value: {}").format("Car") # [misplaced-format-function]
diff --git a/doc/data/messages/m/misplaced-format-function/good.py b/doc/data/messages/m/misplaced-format-function/good.py
index 809dcf974..8b31d5cf5 100644
--- a/doc/data/messages/m/misplaced-format-function/good.py
+++ b/doc/data/messages/m/misplaced-format-function/good.py
@@ -1 +1 @@
-print('Value: {}'.format('Car'))
+print("Value: {}".format("Car"))
diff --git a/doc/data/messages/m/missing-any-param-doc/bad.py b/doc/data/messages/m/missing-any-param-doc/bad.py
index ca92793f5..bf5f232ce 100644
--- a/doc/data/messages/m/missing-any-param-doc/bad.py
+++ b/doc/data/messages/m/missing-any-param-doc/bad.py
@@ -1,3 +1,3 @@
-def puppies(head, tail): #[missing-any-param-doc]
+def puppies(head, tail): # [missing-any-param-doc]
"""Print puppy's details."""
print(head, tail)
diff --git a/doc/data/messages/m/missing-any-param-doc/good.py b/doc/data/messages/m/missing-any-param-doc/good.py
index 238ea1bce..6fa9622ee 100644
--- a/doc/data/messages/m/missing-any-param-doc/good.py
+++ b/doc/data/messages/m/missing-any-param-doc/good.py
@@ -1,7 +1,7 @@
def puppies(head: str, tail: str):
"""Print puppy's details.
- :param head: description of the head of the dog
- :param tail: description of the tail of the dog
+ :param head: description of the head of the dog
+ :param tail: description of the tail of the dog
"""
print(head, tail)
diff --git a/doc/data/messages/m/missing-class-docstring/bad.py b/doc/data/messages/m/missing-class-docstring/bad.py
index 1d0f79c75..e3e1ddbf5 100644
--- a/doc/data/messages/m/missing-class-docstring/bad.py
+++ b/doc/data/messages/m/missing-class-docstring/bad.py
@@ -1,5 +1,4 @@
class Person: # [missing-class-docstring]
-
def __init__(self, first_name, last_name):
self.first_name = first_name
self.last_name = last_name
diff --git a/doc/data/messages/m/missing-final-newline/good.py b/doc/data/messages/m/missing-final-newline/good.py
index fa1e5072e..02d068916 100644
--- a/doc/data/messages/m/missing-final-newline/good.py
+++ b/doc/data/messages/m/missing-final-newline/good.py
@@ -1,6 +1,6 @@
# using LF
-eat("apple", "candy") # \n
+eat("apple", "candy") # \n
print(123) # \nEOF
# using CRLF
diff --git a/doc/data/messages/m/missing-kwoa/bad.py b/doc/data/messages/m/missing-kwoa/bad.py
index 4039c8ff2..2b8deabdf 100644
--- a/doc/data/messages/m/missing-kwoa/bad.py
+++ b/doc/data/messages/m/missing-kwoa/bad.py
@@ -1,5 +1,6 @@
def target(pos, *, keyword):
return pos + keyword
+
def not_forwarding_kwargs(*args, **kwargs):
- target(*args) # [missing-kwoa]
+ target(*args) # [missing-kwoa]
diff --git a/doc/data/messages/m/missing-kwoa/good.py b/doc/data/messages/m/missing-kwoa/good.py
index abb80a118..c212deb98 100644
--- a/doc/data/messages/m/missing-kwoa/good.py
+++ b/doc/data/messages/m/missing-kwoa/good.py
@@ -1,5 +1,6 @@
def target(pos, *, keyword):
return pos + keyword
+
def not_forwarding_kwargs(*args, **kwargs):
target(*args, **kwargs)
diff --git a/doc/data/messages/m/missing-parentheses-for-call-in-test/bad.py b/doc/data/messages/m/missing-parentheses-for-call-in-test/bad.py
index 3f67322dc..e4a7172a4 100644
--- a/doc/data/messages/m/missing-parentheses-for-call-in-test/bad.py
+++ b/doc/data/messages/m/missing-parentheses-for-call-in-test/bad.py
@@ -4,5 +4,6 @@ import random
def is_it_a_good_day():
return random.choice([True, False])
+
if is_it_a_good_day: # [missing-parentheses-for-call-in-test]
print("Today is a good day!")
diff --git a/doc/data/messages/m/missing-parentheses-for-call-in-test/good.py b/doc/data/messages/m/missing-parentheses-for-call-in-test/good.py
index 63c8ccc89..80afd7769 100644
--- a/doc/data/messages/m/missing-parentheses-for-call-in-test/good.py
+++ b/doc/data/messages/m/missing-parentheses-for-call-in-test/good.py
@@ -4,5 +4,6 @@ import random
def is_it_a_good_day():
return random.choice([True, False])
+
if is_it_a_good_day():
print("Today is a good day!")
diff --git a/doc/data/messages/m/missing-raises-doc/bad.py b/doc/data/messages/m/missing-raises-doc/bad.py
index 9a59fea88..51efd3910 100644
--- a/doc/data/messages/m/missing-raises-doc/bad.py
+++ b/doc/data/messages/m/missing-raises-doc/bad.py
@@ -4,5 +4,5 @@ def integer_sum(a: int, b: int): # [missing-raises-doc]
:param b: second integer
"""
if not (isinstance(a, int) and isinstance(b, int)):
- raise ValueError('Function supports only integer parameters.')
+ raise ValueError("Function supports only integer parameters.")
return a + b
diff --git a/doc/data/messages/m/missing-raises-doc/good.py b/doc/data/messages/m/missing-raises-doc/good.py
index c274493ea..6ca44d0fd 100644
--- a/doc/data/messages/m/missing-raises-doc/good.py
+++ b/doc/data/messages/m/missing-raises-doc/good.py
@@ -5,5 +5,5 @@ def integer_sum(a: int, b: int):
:raises ValueError: One of the parameters is not an integer.
"""
if not (isinstance(a, int) and isinstance(b, int)):
- raise ValueError('Function supports only integer parameters.')
+ raise ValueError("Function supports only integer parameters.")
return a + b