(self, node: ast.FunctionDef)
| 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: |
nothing calls this directly
no test coverage detected