Looks up an API function by name. Args: name: The name of the function to get. Returns: The requested ApiFunction.
(cls, name: str)
| 128 | # TODO(user): Any -> ApiFunction for the return type. |
| 129 | @classmethod |
| 130 | def lookup(cls, name: str) -> Any: |
| 131 | """Looks up an API function by name. |
| 132 | |
| 133 | Args: |
| 134 | name: The name of the function to get. |
| 135 | |
| 136 | Returns: |
| 137 | The requested ApiFunction. |
| 138 | """ |
| 139 | result = cls.lookupInternal(name) |
| 140 | # TODO(user): name -> result? |
| 141 | if not name: |
| 142 | raise ee_exception.EEException( |
| 143 | 'Unknown built-in function name: %s' % name) |
| 144 | return result |
| 145 | |
| 146 | @classmethod |
| 147 | def lookupInternal(cls, name: str) -> ApiFunction | None: |