Method 'jsonify_calendar' should have "self" as first argument
243
244 return ctx
245
246 def jsonify_calendar(jsonData):247 return jsonify(jsonData['projects'])
248
249 @route('calendar', methods=['GET'], endpoint='calendar')
Description
The first argument of instance methods must be named self
. This is considered an error since this convention is so common that you shouldn't break it.
Bad practice
class Car:
def __init__(this, color):
this.color = color
def run(this):
print(f'I am a {this.color} car')
Recommended
class Car:
def __init__(self, color):
self.color = color
def run(self):
print(f'I am a {self.color} car')