eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/jinja2Templates.py

changeset 8228
772103b14c18
parent 7923
91e843545d9a
--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/jinja2Templates.py	Mon Apr 12 19:05:23 2021 +0200
+++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/jinja2Templates.py	Mon Apr 12 19:21:40 2021 +0200
@@ -72,15 +72,10 @@
                         value = getattr(node, 'value', None)
                         if (
                             getattr(value, 'id', None) == 'True' or
-                            getattr(value, 'value', None) is True
-                        ):
-                            return
-                        
-                        # Check if select_autoescape function is used.
-                        elif (
-                            isinstance(value, ast.Call) and
-                            (getattr(value.func, 'id', None) ==
-                             'select_autoescape')
+                            getattr(value, 'value', None) is True or
+                            (isinstance(value, ast.Call) and
+                             (getattr(value.func, 'id', None) ==
+                              'select_autoescape'))
                         ):
                             return
                         

eric ide

mercurial