(method, trees)
| 414 | |
| 415 | |
| 416 | def get_matching_signature(method, trees): |
| 417 | sig = inspect.signature(method) |
| 418 | for tree in trees: |
| 419 | for item in tree.body: |
| 420 | if not isinstance(item, ast.FunctionDef): |
| 421 | continue |
| 422 | if item.name == method.__name__: |
| 423 | return update_sig_from_node(item, sig) |
| 424 | # The following methods are implemented outside of the mro of Axes |
| 425 | # and thus do not get their annotated versions found with current code |
| 426 | # stackplot |
| 427 | # streamplot |
| 428 | # table |
| 429 | # tricontour |
| 430 | # tricontourf |
| 431 | # tripcolor |
| 432 | # triplot |
| 433 | |
| 434 | # import warnings |
| 435 | # warnings.warn(f"'{method.__name__}' not found") |
| 436 | return sig |
| 437 | |
| 438 | |
| 439 | def update_sig_from_node(node, sig): |
no test coverage detected
searching dependent graphs…