src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/jinja2Templates.py

branch
eric7
changeset 10683
779cda568acb
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
equal deleted inserted replaced
10682:47be220abdaf 10683:779cda568acb
31 (checkJinja2Autoescape, ("S701",)), 31 (checkJinja2Autoescape, ("S701",)),
32 ], 32 ],
33 } 33 }
34 34
35 35
36 def checkJinja2Autoescape(reportError, context, config): # noqa: U100 36 def checkJinja2Autoescape(reportError, context, _config):
37 """ 37 """
38 Function to check for not auto escaping in jinja2. 38 Function to check for not auto escaping in jinja2.
39 39
40 @param reportError function to be used to report errors 40 @param reportError function to be used to report errors
41 @type func 41 @type func
42 @param context security context object 42 @param context security context object
43 @type SecurityContext 43 @type SecurityContext
44 @param config dictionary with configuration data 44 @param _config dictionary with configuration data (unused)
45 @type dict 45 @type dict
46 """ 46 """
47 if isinstance(context.callFunctionNameQual, str): 47 if isinstance(context.callFunctionNameQual, str):
48 qualnameList = context.callFunctionNameQual.split(".") 48 qualnameList = context.callFunctionNameQual.split(".")
49 func = qualnameList[-1] 49 func = qualnameList[-1]

eric ide

mercurial