Return top-level non-lambda function.
(self)
| 307 | return None |
| 308 | |
| 309 | def top_level_function(self) -> FuncItem | None: |
| 310 | """Return top-level non-lambda function.""" |
| 311 | for e in self.stack: |
| 312 | if isinstance(e, FuncItem) and not isinstance(e, LambdaExpr): |
| 313 | return e |
| 314 | return None |
| 315 | |
| 316 | def active_class(self) -> TypeInfo | None: |
| 317 | if isinstance(self.stack[-1], TypeInfo): |
no test coverage detected