123 @param context security context object |
123 @param context security context object |
124 @type SecurityContext |
124 @type SecurityContext |
125 @param config dictionary with configuration data |
125 @param config dictionary with configuration data |
126 @type dict |
126 @type dict |
127 """ |
127 """ |
128 if context.isModuleImportedLike('django.db.models'): |
128 if ( |
129 if context.callFunctionName == 'RawSQL': |
129 context.isModuleImportedLike('django.db.models') and |
130 sql = context.node.args[0] |
130 context.callFunctionName == 'RawSQL' |
131 if not AstUtilities.isString(sql): |
131 ): |
132 reportError( |
132 sql = context.node.args[0] |
133 context.node.lineno - 1, |
133 if not AstUtilities.isString(sql): |
134 context.node.col_offset, |
134 reportError( |
135 "S611", |
135 context.node.lineno - 1, |
136 "M", |
136 context.node.col_offset, |
137 "M" |
137 "S611", |
138 ) |
138 "M", |
|
139 "M" |
|
140 ) |