Python plugin: remove unnecessary fields from signature (#12533)

# Description
Remove a couple of legacy fields (`input_type`, `output_type`), and
`var_id` which is optional and not required for deserialization.

I think until I document this in the plugin protocol ref, most people
will probably be using this example to get started, so it should be as
correct as possible

# After Submitting
- [ ] TODO: document `Signature` in plugin protocol reference
This commit is contained in:
Devyn Cairns 2024-04-16 04:40:04 -07:00 committed by GitHub
parent 1661bb68f9
commit 03317ff92e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,20 +45,16 @@ def signatures():
"name": "nu-python", "name": "nu-python",
"usage": "Signature test for Python", "usage": "Signature test for Python",
"extra_usage": "", "extra_usage": "",
"input_type": "Any",
"output_type": "Any",
"required_positional": [ "required_positional": [
{ {
"name": "a", "name": "a",
"desc": "required integer value", "desc": "required integer value",
"shape": "Int", "shape": "Int",
"var_id": None,
}, },
{ {
"name": "b", "name": "b",
"desc": "required string value", "desc": "required string value",
"shape": "String", "shape": "String",
"var_id": None,
}, },
], ],
"optional_positional": [ "optional_positional": [
@ -66,14 +62,12 @@ def signatures():
"name": "opt", "name": "opt",
"desc": "Optional number", "desc": "Optional number",
"shape": "Int", "shape": "Int",
"var_id": None,
} }
], ],
"rest_positional": { "rest_positional": {
"name": "rest", "name": "rest",
"desc": "rest value string", "desc": "rest value string",
"shape": "String", "shape": "String",
"var_id": None,
}, },
"named": [ "named": [
{ {
@ -82,7 +76,6 @@ def signatures():
"arg": None, "arg": None,
"required": False, "required": False,
"desc": "Display the help message for this command", "desc": "Display the help message for this command",
"var_id": None,
}, },
{ {
"long": "flag", "long": "flag",
@ -90,7 +83,6 @@ def signatures():
"arg": None, "arg": None,
"required": False, "required": False,
"desc": "a flag for the signature", "desc": "a flag for the signature",
"var_id": None,
}, },
{ {
"long": "named", "long": "named",
@ -98,7 +90,6 @@ def signatures():
"arg": "String", "arg": "String",
"required": False, "required": False,
"desc": "named string", "desc": "named string",
"var_id": None,
}, },
], ],
"input_output_types": [["Any", "Any"]], "input_output_types": [["Any", "Any"]],