(node: FuncBase, mx: MemberContext)
| 390 | |
| 391 | |
| 392 | def validate_super_call(node: FuncBase, mx: MemberContext) -> None: |
| 393 | unsafe_super = False |
| 394 | if isinstance(node, FuncDef) and node.is_trivial_body: |
| 395 | unsafe_super = True |
| 396 | elif isinstance(node, OverloadedFuncDef): |
| 397 | if node.impl: |
| 398 | impl = node.impl if isinstance(node.impl, FuncDef) else node.impl.func |
| 399 | unsafe_super = impl.is_trivial_body |
| 400 | elif not node.is_property and node.items: |
| 401 | assert isinstance(node.items[0], Decorator) |
| 402 | unsafe_super = node.items[0].func.is_trivial_body |
| 403 | if unsafe_super: |
| 404 | mx.msg.unsafe_super(node.name, node.info.name, mx.context) |
| 405 | |
| 406 | |
| 407 | def analyze_type_callable_member_access(name: str, typ: FunctionLike, mx: MemberContext) -> Type: |
no test coverage detected
searching dependent graphs…