Lint: E302 expected 2 blank lines, found X

This commit is contained in:
2020-11-07 14:45:24 -05:00
parent e9643651f7
commit 260b39ebf2
36 changed files with 694 additions and 19 deletions

View File

@ -27,6 +27,7 @@ import requests
import click
from urllib3 import disable_warnings
def format_bytes(size_bytes):
byte_unit_matrix = {
'B': 1,
@ -44,6 +45,7 @@ def format_bytes(size_bytes):
break
return human_bytes
def format_metric(integer):
integer_unit_matrix = {
'': 1,
@ -61,6 +63,7 @@ def format_metric(integer):
break
return human_integer
class UploadProgressBar(object):
def __init__(self, filename, end_message='', end_nl=True):
file_size = os.path.getsize(filename)
@ -103,6 +106,7 @@ class UploadProgressBar(object):
if self.end_message:
click.echo(self.end_message + self.end_suffix, nl=self.end_nl)
class ErrorResponse(requests.Response):
def __init__(self, json_data, status_code):
self.json_data = json_data
@ -111,6 +115,7 @@ class ErrorResponse(requests.Response):
def json(self):
return self.json_data
def call_api(config, operation, request_uri, headers={}, params=None, data=None, files=None):
# Craft the URI
uri = '{}://{}{}{}'.format(