return
detected PYL-R1711 87 return True
88
89 # @profile
90 def collect(self, callback=defaultCallback, context=None, max_cost=64): 91 worklist = {}
92
93 # Init worklist
A single return
or return None
statement is found at the end of the function or method definition. This statement can safely be removed to improve the readability because Python will implicitly return None
.
def log_data(data):
'''Sends the data to our logging API.'''
api = get_api()
api.send(data)
return # Unnecessary return
def print_pattern():
print('*')
print('**')
print('***')
return None # Unnecessary return
def log_data(data):
'''Sends the data to our logging API.'''
api = get_api()
api.send(data)
def print_pattern():
print('*')
print('**')
print('***')