MCPcopy Index your code
hub / github.com/dbcli/mycli / convert

Method convert

mycli/main.py:26–34  ·  view source on GitHub ↗
(self, value, param, ctx)

Source from the content-addressed store, hash-verified

24 name = 'text' # display as TEXT in helpdoc
25
26 def convert(self, value, param, ctx):
27 if isinstance(value, int):
28 return value
29 elif isinstance(value, str):
30 return value
31 elif value is None:
32 return value
33 else:
34 self.fail('Not a valid password string', param, ctx)
35
36
37INT_OR_STRING_CLICK_TYPE = IntOrStringClickParamType()

Calls 1

failMethod · 0.80