assert_release_manager_calls
doesn't contain any code 73 if pull_request:
74 self.assert_auto_approve_calls(pull_request)
75
76 def assert_release_manager_calls(self, **_): 77 ...
78 # # Create Pull Request
79 # self.assert_create_pull_request_calls(create_pull_call)
Description
The function/method has been left empty here, without any comment or docstring. This can cause confusion later on why this was left empty.
- If it is intentionally left blank, a nested comment should explain the reason why it is being done.
- If this is not yet, or never will be, supported, an exception should be thrown rather than leaving it blank.
Not preferred:
def myfunc1(foo="Noncompliant"):
pass
class MyClass:
def mymethod1(self, foo="Noncompliant"):
pass
Preferred:
def myfunc1():
pass # comment explaining why this function is empty
def myfunc2():
raise NotImplementedError()
def myfunc3():
'''
Docstring explaining why this function is empty.
'''
class MyClass:
def mymethod1(self):
pass # comment explaining why this function is empty
def mymethod2(self):
raise NotImplementedError()
def mymethod3(self):
'''
Docstring explaining why this method is empty. Note that this is not recommended for classes
which are meant to be subclassed.
'''