42 @param config dictionary with configuration data |
42 @param config dictionary with configuration data |
43 @type dict |
43 @type dict |
44 """ |
44 """ |
45 if ( |
45 if ( |
46 context.isModuleImportedLike('paramiko') and |
46 context.isModuleImportedLike('paramiko') and |
47 context.callFunctionName == 'set_missing_host_key_policy' |
47 context.callFunctionName == 'set_missing_host_key_policy' and |
|
48 context.callArgs and |
|
49 context.callArgs[0] in ['AutoAddPolicy', 'WarningPolicy'] |
48 ): |
50 ): |
49 if ( |
51 reportError( |
50 context.callArgs and |
52 context.node.lineno - 1, |
51 context.callArgs[0] in ['AutoAddPolicy', 'WarningPolicy'] |
53 context.node.col_offset, |
52 ): |
54 "S507", |
53 reportError( |
55 "H", |
54 context.node.lineno - 1, |
56 "M", |
55 context.node.col_offset, |
57 ) |
56 "S507", |
|
57 "H", |
|
58 "M", |
|
59 ) |
|