MCPcopy
hub / github.com/python/mypy / add_plugin_dependency

Method add_plugin_dependency

mypy/semanal.py:7886–7893  ·  view source on GitHub ↗

Add dependency from trigger to a target. If the target is not given explicitly, use the current target.

(self, trigger: str, target: str | None = None)

Source from the content-addressed store, hash-verified

7884 )
7885
7886 def add_plugin_dependency(self, trigger: str, target: str | None = None) -> None:
7887 """Add dependency from trigger to a target.
7888
7889 If the target is not given explicitly, use the current target.
7890 """
7891 if target is None:
7892 target = self.scope.current_target()
7893 self.cur_mod_node.plugin_deps.setdefault(trigger, set()).add(target)
7894
7895 def add_type_alias_deps(
7896 self, aliases_used: Collection[str], target: str | None = None

Callers 2

collect_attributesMethod · 0.45
_analyze_classFunction · 0.45

Calls 4

setClass · 0.85
setdefaultMethod · 0.80
current_targetMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected