eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityNodeVisitor.py

changeset 7651
ca87b7490449
parent 7613
382f89c11e27
child 7923
91e843545d9a
diff -r 36c2dc7e3437 -r ca87b7490449 eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityNodeVisitor.py
--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityNodeVisitor.py	Mon Jul 27 19:15:26 2020 +0200
+++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityNodeVisitor.py	Wed Jul 29 17:37:09 2020 +0200
@@ -73,12 +73,31 @@
         """
         Public method defining a visitor for AST FunctionDef nodes.
         
+        @param node reference to the node being inspected
+        @type ast.FunctionDef
+        """
+        self.__visitFunctionDefinition(node)
+    
+    def visit_AsyncFunctionDef(self, node):
+        """
+        Public method defining a visitor for AST AsyncFunctionDef nodes.
+        
+        @param node reference to the node being inspected
+        @type ast.AsyncFunctionDef
+        """
+        self.__visitFunctionDefinition(node)
+    
+    def __visitFunctionDefinition(self, node):
+        """
+        Private method defining a visitor for AST FunctionDef and
+        AsyncFunctionDef nodes.
+        
         Add relevant information about the node to the context for use in tests
         which inspect function definitions. Add the function name to the
         current namespace for all descendants.
         
         @param node reference to the node being inspected
-        @type ast.FunctionDef
+        @type ast.FunctionDef, ast.AsyncFunctionDef
         """
         self.__context['function'] = node
         qualname = SecurityUtils.namespacePathJoin(self.namespace, node.name)

eric ide

mercurial