Skip to content

Commit

Permalink
PEP8
Browse files Browse the repository at this point in the history
  • Loading branch information
cmlccie committed Oct 29, 2017
1 parent d91b27e commit 6fa7215
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
ignore = E402,F401,F403
ignore = E402,F401,F403,F405,W503
exclude =
.git,
__pycache__,
Expand Down
2 changes: 1 addition & 1 deletion ciscosparkapi/api/organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def __init__(self, session):
self._session = session

@generator_container
def list(self, max=None, **request_parameters):
def list(self, max=None, **request_parameters):
"""List Organizations.
This method supports Cisco Spark's implementation of RFC5988 Web
Expand Down
36 changes: 18 additions & 18 deletions ciscosparkapi/api/people.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,15 @@ def create(self, emails, displayName=None, firstName=None, lastName=None,
check_type(licenses, list)

post_data = dict_from_items_with_values(
request_parameters,
emails=emails,
displayName=displayName,
firstName=firstName,
lastName=lastName,
avatar=avatar,
orgId=orgId,
roles=roles,
licenses=licenses,
request_parameters,
emails=emails,
displayName=displayName,
firstName=firstName,
lastName=lastName,
avatar=avatar,
orgId=orgId,
roles=roles,
licenses=licenses,
)

# API request
Expand Down Expand Up @@ -342,15 +342,15 @@ def update(self, personId, emails=None, displayName=None, firstName=None,
check_type(licenses, list)

put_data = dict_from_items_with_values(
request_parameters,
emails=emails,
displayName=displayName,
firstName=firstName,
lastName=lastName,
avatar=avatar,
orgId=orgId,
roles=roles,
licenses=licenses,
request_parameters,
emails=emails,
displayName=displayName,
firstName=firstName,
lastName=lastName,
avatar=avatar,
orgId=orgId,
roles=roles,
licenses=licenses,
)

# API request
Expand Down
10 changes: 5 additions & 5 deletions ciscosparkapi/api/rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ def create(self, title, teamId=None, **request_parameters):
check_type(teamId, basestring)

post_data = dict_from_items_with_values(
request_parameters,
title=title,
teamId=teamId,
request_parameters,
title=title,
teamId=teamId,
)

# API request
Expand Down Expand Up @@ -253,8 +253,8 @@ def update(self, roomId, title=None, **request_parameters):
check_type(roomId, basestring)

put_data = dict_from_items_with_values(
request_parameters,
title=title,
request_parameters,
title=title,
)

# API request
Expand Down
2 changes: 1 addition & 1 deletion ciscosparkapi/api/teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def list(self, max=None, **request_parameters):
for item in items:
yield Team(item)

def create(self, name, **request_parameters):
def create(self, name, **request_parameters):
"""Create a team.
The authenticated user is automatically added as a member of the team.
Expand Down
8 changes: 4 additions & 4 deletions ciscosparkapi/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ def response_to_string(response):
# Prepare request components
req = textwrap.fill("{} {}".format(request.method, request.url),
width=79,
subsequent_indent=' ' * (len(request.method)+1))
subsequent_indent=' ' * (len(request.method) + 1))
req_headers = [
textwrap.fill("{}: {}".format(*sanitize(header)),
width=79,
subsequent_indent=' '*4)
subsequent_indent=' ' * 4)
for header in request.headers.items()
]
req_body = (textwrap.fill(to_unicode(request.body), width=79)
Expand All @@ -83,10 +83,10 @@ def response_to_string(response):
response.reason
if response.reason else ""),
width=79,
subsequent_indent=' ' * (len(request.method)+1))
subsequent_indent=' ' * (len(request.method) + 1))
resp_headers = [
textwrap.fill("{}: {}".format(*header), width=79,
subsequent_indent=' '*4)
subsequent_indent=' ' * 4)
for header in response.headers.items()
]
resp_body = textwrap.fill(response.text, width=79) if response.text else ""
Expand Down
2 changes: 1 addition & 1 deletion ciscosparkapi/responsecodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"present that specifies how many seconds you need to wait before a "
"successful request can be made.",
500: "Something went wrong on the server.",
503: "The server received an invalid response from an upstream server "
502: "The server received an invalid response from an upstream server "
"while processing the request. Try again later.",
503: "Server is overloaded with requests. Try again later."
}
Expand Down

0 comments on commit 6fa7215

Please sign in to comment.