MCPcopy
hub / github.com/google/earthengine-api / _registerPromoter

Method _registerPromoter

python/ee/function.py:23–33  ·  view source on GitHub ↗

Registers a function used to type-coerce arguments and return values. Args: promoter: A function used to type-coerce arguments and return values. Passed a value as the first parameter and a type name as the second. Can be used, for example, promote numbers or strings t

(promoter)

Source from the content-addressed store, hash-verified

21
22 @staticmethod
23 def _registerPromoter(promoter):
24 """Registers a function used to type-coerce arguments and return values.
25
26 Args:
27 promoter: A function used to type-coerce arguments and return values.
28 Passed a value as the first parameter and a type name as the second.
29 Can be used, for example, promote numbers or strings to Images.
30 Should return the input promoted if the type is recognized,
31 otherwise the original input.
32 """
33 Function._promoter = staticmethod(promoter)
34
35 def getSignature(self) -> dict[str, Any]:
36 """Returns a description of the interface provided by this function.

Callers 3

__init__.pyFile · 0.80
test_promote_argsMethod · 0.80
test_callMethod · 0.80

Calls

no outgoing calls

Tested by 2

test_promote_argsMethod · 0.64
test_callMethod · 0.64