Skip to content

Commit f2e8dbf

Browse files
AndrewTwydellandrewhughes101
authored andcommitted
resolving cmci variable lint errors
Signed-off-by: Andrew Twydell <[email protected]>
1 parent fa826d5 commit f2e8dbf

8 files changed

+12
-8
lines changed

.ansible-lint

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ skip_list:
77
- "galaxy[no-changelog]"
88
- "meta-unsupported-ansible"
99
- "meta-runtime[unsupported-version]"
10+
- "var-naming[no-role-prefix]"

plugins/module_utils/cmci.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@
88

99
from ansible.module_utils.basic import AnsibleModule, missing_required_lib,\
1010
env_fallback
11-
from typing import Optional, Dict, Any, List
11+
from typing import Optional, Dict, Any, List, Tuple
1212
from collections import OrderedDict
1313
from sys import version_info
1414
import re
1515
import traceback
1616
import urllib
1717

18+
REQUESTS_IMP_ERR = ""
19+
XMLTODICT_IMP_ERR = ""
20+
1821
try:
1922
import requests
2023
except ImportError:
@@ -178,7 +181,7 @@ def read_error_node(node): # type: (OrderedDict) -> List[OrderedDict]
178181

179182

180183
def read_error_detail(key, value):
181-
# type: (List[str, OrderedDict]) -> Tuple[str, List[OrderedDict]]
184+
# type: (str, OrderedDict) -> Tuple[str, List[OrderedDict]]
182185
# Xmltodict parses inner error types as Dicts when there is only one item in
183186
# it even though it may well be a list if multiple results were returned. If
184187
# we find a dict here, wrap it in a list so we can account for only one

tests/unit/modules/test_cmci_action.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
)
1515

1616

17-
def test_csd_install(cmci_module): # type: (CMCITestHelper) -> None
17+
def test_csd_install(cmci_module): # type: (cmci_module) -> None
1818
record = dict(
1919
name='bar',
2020
bundledir='/u/bundles/bloop',

tests/unit/modules/test_cmci_create.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
)
1414

1515

16-
def test_csd_create(cmci_module): # type: (CMCITestHelper) -> None
16+
def test_csd_create(cmci_module): # type: (cmci_module) -> None
1717
record = OrderedDict({})
1818
record['csdgroup'] = 'bat'
1919
record['name'] = 'bar'

tests/unit/modules/test_cmci_delete.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
)
1313

1414

15-
def test_delete_context(cmci_module): # type: (CMCITestHelper) -> None
15+
def test_delete_context(cmci_module): # type: (cmci_module) -> None
1616
cmci_module.stub_delete('cicsdefinitionbundle', 1)
1717

1818
cmci_module.expect(

tests/unit/modules/test_cmci_filters.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
expected_type = 'type'
2020

2121

22-
def test_query_criteria(cmci_module): # type: (CMCITestHelper) -> None
22+
def test_query_criteria(cmci_module): # type: (cmci_module) -> None
2323
records = [{'name': 'bat', 'dsname': 'STEWF.BLOP.BLIP'}]
2424
cmci_module.stub_records('GET', 'cicslocalfile', records, scope=SCOPE, parameters='?CRITERIA=%28FOO%3D%27BAR%27%29')
2525

tests/unit/modules/test_cmci_get.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import sys
1919

2020

21-
def test_401_fails(cmci_module): # type: (CMCITestHelper) -> None
21+
def test_401_fails(cmci_module): # type: (cmci_module) -> None
2222
cmci_module.stub_request(
2323
'GET',
2424
'https://winmvs2c.hursley.ibm.com:26040/CICSSystemManagement/CICSDefinitionBundle/CICPY012/',

tests/unit/modules/test_cmci_update.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
)
1313

1414

15-
def test_csd_update(cmci_module): # type: (CMCITestHelper) -> None
15+
def test_csd_update(cmci_module): # type: (cmci_module) -> None
1616
record = dict(
1717
changeagent='CSDAPI',
1818
changeagrel='0730',

0 commit comments

Comments
 (0)