(self, node: ast.FunctionDef | ast.AsyncFunctionDef)
| 923 | ) |
| 924 | |
| 925 | def _check_S022(self, node: ast.FunctionDef | ast.AsyncFunctionDef) -> None: |
| 926 | if not self._publish_status or node.name not in HTTP_METHODS: |
| 927 | return |
| 928 | if self._publish_status.get(node.name.upper()) not in PUBLISHED_STATUSES: |
| 929 | return |
| 930 | if node.returns is None: |
| 931 | self.errors.append((node.lineno, node.col_offset, S022_missing_msg)) |
| 932 | elif _annotation_has_bare_response(node.returns): |
| 933 | self.errors.append((node.lineno, node.col_offset, S022_bare_msg)) |
| 934 | |
| 935 | def _check_S023(self, node: ast.ClassDef) -> None: |
| 936 | for dec in node.decorator_list: |
no test coverage detected