Customize dependencies for a module. This hook allows adding in new dependencies for a module. It is called after parsing a file but before analysis. This can be useful if a library has dependencies that are dynamic based on configuration information, for example.
(self, file: MypyFile)
| 571 | return None |
| 572 | |
| 573 | def get_additional_deps(self, file: MypyFile) -> list[tuple[int, str, int]]: |
| 574 | """Customize dependencies for a module. |
| 575 | |
| 576 | This hook allows adding in new dependencies for a module. It |
| 577 | is called after parsing a file but before analysis. This can |
| 578 | be useful if a library has dependencies that are dynamic based |
| 579 | on configuration information, for example. |
| 580 | |
| 581 | Returns a list of (priority, module name, line number) tuples. |
| 582 | |
| 583 | The line number can be -1 when there is not a known real line number. |
| 584 | |
| 585 | Priorities are defined in mypy.build (but maybe shouldn't be). |
| 586 | 10 is a good choice for priority. |
| 587 | """ |
| 588 | return [] |
| 589 | |
| 590 | def get_type_analyze_hook(self, fullname: str) -> Callable[[AnalyzeTypeContext], Type] | None: |
| 591 | """Customize behaviour of the type analyzer for given full names. |
no outgoing calls
no test coverage detected