system.methodHelp('add') => "Adds two integers together" Returns a string containing documentation for the specified method.
(self, method_name)
| 308 | return 'signatures not supported' |
| 309 | |
| 310 | def system_methodHelp(self, method_name): |
| 311 | """system.methodHelp('add') => "Adds two integers together" |
| 312 | |
| 313 | Returns a string containing documentation for the specified method.""" |
| 314 | |
| 315 | method = None |
| 316 | if method_name in self.funcs: |
| 317 | method = self.funcs[method_name] |
| 318 | elif self.instance is not None: |
| 319 | # Instance can implement _methodHelp to return help for a method |
| 320 | if hasattr(self.instance, '_methodHelp'): |
| 321 | return self.instance._methodHelp(method_name) |
| 322 | # if the instance has a _dispatch method then we |
| 323 | # don't have enough information to provide help |
| 324 | elif not hasattr(self.instance, '_dispatch'): |
| 325 | try: |
| 326 | method = resolve_dotted_attribute( |
| 327 | self.instance, |
| 328 | method_name, |
| 329 | self.allow_dotted_names |
| 330 | ) |
| 331 | except AttributeError: |
| 332 | pass |
| 333 | |
| 334 | # Note that we aren't checking that the method actually |
| 335 | # be a callable object of some kind |
| 336 | if method is None: |
| 337 | return "" |
| 338 | else: |
| 339 | return pydoc.getdoc(method) |
| 340 | |
| 341 | def system_multicall(self, call_list): |
| 342 | """system.multicall([{'methodName': 'add', 'params': [2, 2]}, ...]) => \ |
nothing calls this directly
no test coverage detected