MCPcopy Create free account
hub / github.com/getsentry/sentry / visit_FunctionDef

Method visit_FunctionDef

tools/flake8_plugin.py:849–862  ·  view source on GitHub ↗
(self, node: ast.FunctionDef)

Source from the content-addressed store, hash-verified

847 self._class_decorators = outer_decorators
848
849 def visit_FunctionDef(self, node: ast.FunctionDef) -> None:
850 if len(self._class_stack) == 1 and self._function_depth == 0:
851 self._check_S021(node)
852 self._check_S022(node)
853 entered = self._enter_input(node)
854 self._function_depth += 1
855 self._function_stack.append(node.name)
856 try:
857 self.generic_visit(node)
858 finally:
859 self._function_stack.pop()
860 self._function_depth -= 1
861 if entered:
862 self._exit_input()
863
864 def visit_AsyncFunctionDef(self, node: ast.AsyncFunctionDef) -> None:
865 if len(self._class_stack) == 1 and self._function_depth == 0:

Callers

nothing calls this directly

Calls 7

_check_S021Method · 0.95
_check_S022Method · 0.95
_enter_inputMethod · 0.95
_exit_inputMethod · 0.95
appendMethod · 0.65
generic_visitMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected