From 8c70189422f86abc215a01f5735fa39c8378fed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20N=2E=20Robalino?= Date: Thu, 15 Dec 2022 15:37:12 -0500 Subject: [PATCH] (nu_plugin_python): Send back the signature required fields. (#7489) # Description The `Signature` data structure has changed. We need to add the required fields for the nu plugin in python to work well when registering it. # Tests + Formatting Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass --- crates/nu_plugin_python/nu_plugin_python_example.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/nu_plugin_python/nu_plugin_python_example.py b/crates/nu_plugin_python/nu_plugin_python_example.py index a7fc876e78..41ca4ac64f 100644 --- a/crates/nu_plugin_python/nu_plugin_python_example.py +++ b/crates/nu_plugin_python/nu_plugin_python_example.py @@ -71,6 +71,7 @@ def signatures(): "shape": "String", "var_id": None, }, + "vectorizes_over_list": False, "named": [ { "long": "help", @@ -97,6 +98,8 @@ def signatures(): "var_id": None, }, ], + "input_output_types": [["Any", "Any"]], + "allow_variants_without_examples": True, "search_terms": ["Python", "Example"], "is_filter": False, "creates_scope": False,