--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/djangoSqlInjection.py Sun Apr 11 16:53:48 2021 +0200 +++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/djangoSqlInjection.py Sun Apr 11 18:45:10 2021 +0200 @@ -125,14 +125,16 @@ @param config dictionary with configuration data @type dict """ - if context.isModuleImportedLike('django.db.models'): - if context.callFunctionName == 'RawSQL': - sql = context.node.args[0] - if not AstUtilities.isString(sql): - reportError( - context.node.lineno - 1, - context.node.col_offset, - "S611", - "M", - "M" - ) + if ( + context.isModuleImportedLike('django.db.models') and + context.callFunctionName == 'RawSQL' + ): + sql = context.node.args[0] + if not AstUtilities.isString(sql): + reportError( + context.node.lineno - 1, + context.node.col_offset, + "S611", + "M", + "M" + )