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)
| 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. |
no outgoing calls