Skip to content

Commit 04703dd

Browse files
authored
Merge pull request #98 from stewartfrancis/fix-sanity-tests
Fix pep8 sanity tests
2 parents 60fdac6 + 104e16a commit 04703dd

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

plugins/doc_fragments/cmci.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class ModuleDocFragment(object):
117117
description: HTTP request timeout in seconds
118118
type: int
119119
required: false
120-
default: 30
120+
default: 30
121121
'''
122122

123123
RESOURCES = r'''

plugins/module_utils/cmci.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ def read_node(node): # type: (OrderedDict) -> List[OrderedDict]
163163
return result
164164

165165

166-
def read_error_node(node): # type: (OrderedDict) -> List[OrderedDict]
167-
# Reads an error node than can contain multiple lists of attributes that themselves contain
168-
# multiple lists of attributes
166+
def read_error_node(node): # type: (OrderedDict) -> List[OrderedDict]
167+
# Reads an error node than can contain multiple lists of attributes that
168+
# themselves contain multiple lists of attributes
169169
result = [
170170
OrderedDict(
171171
# Feedback nodes can contain error types with further information
@@ -177,10 +177,12 @@ def read_error_node(node): # type: (OrderedDict) -> List[OrderedDict]
177177
return result
178178

179179

180-
def read_error_detail(key, value): # type: (List[str, OrderedDict]) -> Tuple[str, List[OrderedDict]]
181-
# Xmltodict parses inner error types as Dicts when there is only one item in it even though it may well be a list
182-
# if multiple results were returned. If we find a dict here, wrap it in a list so we can account for only one result or many
183-
# being returned
180+
def read_error_detail(key, value):
181+
# type: (List[str, OrderedDict]) -> Tuple[str, List[OrderedDict]]
182+
# Xmltodict parses inner error types as Dicts when there is only one item in
183+
# it even though it may well be a list if multiple results were returned. If
184+
# we find a dict here, wrap it in a list so we can account for only one
185+
# result or many being returned
184186
if not isinstance(value, list):
185187
value = [value]
186188
return key, \
@@ -192,8 +194,8 @@ def read_error_detail(key, value): # type: (List[str, OrderedDict]) -> Tuple[str
192194

193195

194196
def get_attribute(k, v):
195-
#Return key, value pair stripping @ from the attributes key
196-
return (k[1:], v)
197+
# Return key, value pair stripping @ from the attributes key
198+
return k[1:], v
197199

198200

199201
class AnsibleCMCIModule(object):

prod-requirements.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)