MCPcopy Create free account
hub / github.com/python-visualization/folium / MethodCall

Class MethodCall

folium/elements.py:182–203  ·  view source on GitHub ↗

Abstract class to add an element to another element.

Source from the content-addressed store, hash-verified

180
181
182class MethodCall(MacroElement):
183 """Abstract class to add an element to another element."""
184
185 _template = Template(
186 """
187 {% macro script(this, kwargs) %}
188 {{ this.target }}.{{ this.method }}(
189 {% for arg in this.args %}
190 {{ arg | tojavascript }},
191 {% endfor %}
192 {{ this.kwargs | tojavascript }}
193 );
194 {% endmacro %}
195 """
196 )
197
198 def __init__(self, target: MacroElement, method: str, *args, **kwargs):
199 super().__init__()
200 self.target = target.get_name()
201 self.method = camelize(method)
202 self.args = args
203 self.kwargs = kwargs

Callers 1

innerFunction · 0.85

Calls 1

TemplateClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…