Fix python test for flake8

This commit is contained in:
Gabo 2020-07-21 19:54:30 -05:00
parent f372e4668b
commit 6c2e32ce14

View file

@ -23,6 +23,7 @@ headers = {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
} }
def create_label(repo_id, label): def create_label(repo_id, label):
""" """
Create label in the supplied repo. Create label in the supplied repo.
@ -52,6 +53,7 @@ def create_label(repo_id, label):
return response return response
def get_labels(owner, repo): def get_labels(owner, repo):
""" """
Gets a list of labels from the supplied repo. Gets a list of labels from the supplied repo.
@ -83,6 +85,7 @@ def get_labels(owner, repo):
'[ERROR] getting issue labels. Status Code: {status_code} - Message: {result}'.format( '[ERROR] getting issue labels. Status Code: {status_code} - Message: {result}'.format(
status_code=status_code, result=result["message"])) status_code=status_code, result=result["message"]))
def delete_label(label_id): def delete_label(label_id):
""" """
Delete the specified label Delete the specified label
@ -106,6 +109,7 @@ def delete_label(label_id):
return result return result
@click.command() @click.command()
@click.option('--dry', is_flag=True) @click.option('--dry', is_flag=True)
@click.argument('source_repo') @click.argument('source_repo')
@ -149,6 +153,7 @@ def copy_labels(source_repo, target_repo, dry):
print('Done') print('Done')
if __name__ == "__main__": if __name__ == "__main__":
# Pylint doesn't know that @click.command takes care of injecting the # Pylint doesn't know that @click.command takes care of injecting the
# function parameters. Disabling Pylint error. # function parameters. Disabling Pylint error.