11146:59e04f7003e9 | 11147:dee6e106b4d3 |
---|---|
24 list of codes | 24 list of codes |
25 @rtype dict | 25 @rtype dict |
26 """ | 26 """ |
27 return { | 27 return { |
28 "Call": [ | 28 "Call": [ |
29 (checkFlaskDebug, ("S201",)), | 29 (checkFlaskDebug, ("S-201",)), |
30 ], | 30 ], |
31 } | 31 } |
32 | 32 |
33 | 33 |
34 def checkFlaskDebug(reportError, context, _config): | 34 def checkFlaskDebug(reportError, context, _config): |
45 if ( | 45 if ( |
46 context.isModuleImportedLike("flask") | 46 context.isModuleImportedLike("flask") |
47 and context.callFunctionNameQual.endswith(".run") | 47 and context.callFunctionNameQual.endswith(".run") |
48 and context.checkCallArgValue("debug", "True") | 48 and context.checkCallArgValue("debug", "True") |
49 ): | 49 ): |
50 reportError(context.node.lineno - 1, context.node.col_offset, "S201", "L", "M") | 50 reportError(context.node.lineno - 1, context.node.col_offset, "S-201", "L", "M") |