Apply a plugin hook that may infer a more precise signature for a function.
(
self,
callee: FunctionLike,
args: list[Expression],
arg_kinds: list[ArgKind],
context: Context,
arg_names: Sequence[str | None] | None,
signature_hook: Callable[[FunctionSigContext], FunctionLike],
)
| 1317 | return Overloaded(items) |
| 1318 | |
| 1319 | def apply_function_signature_hook( |
| 1320 | self, |
| 1321 | callee: FunctionLike, |
| 1322 | args: list[Expression], |
| 1323 | arg_kinds: list[ArgKind], |
| 1324 | context: Context, |
| 1325 | arg_names: Sequence[str | None] | None, |
| 1326 | signature_hook: Callable[[FunctionSigContext], FunctionLike], |
| 1327 | ) -> FunctionLike: |
| 1328 | """Apply a plugin hook that may infer a more precise signature for a function.""" |
| 1329 | return self.apply_signature_hook( |
| 1330 | callee, |
| 1331 | args, |
| 1332 | arg_kinds, |
| 1333 | arg_names, |
| 1334 | (lambda args, sig: signature_hook(FunctionSigContext(args, sig, context, self.chk))), |
| 1335 | ) |
| 1336 | |
| 1337 | def apply_method_signature_hook( |
| 1338 | self, |
no test coverage detected