forked from extern/nushell
update nu_plugin_python due to signature changes (#8107)
# Description As title.. # User-Facing Changes None # 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 # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date.
This commit is contained in:
parent
66398fbf77
commit
789b2e603a
6
crates/nu_plugin_python/nu_plugin_python_example.py
Normal file → Executable file
6
crates/nu_plugin_python/nu_plugin_python_example.py
Normal file → Executable file
@ -1,3 +1,4 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
# Example of using a Python script as a Nushell plugin
|
# Example of using a Python script as a Nushell plugin
|
||||||
#
|
#
|
||||||
# The example uses JSON encoding but it should be a similar process using
|
# The example uses JSON encoding but it should be a similar process using
|
||||||
@ -38,6 +39,7 @@ def signatures():
|
|||||||
return {
|
return {
|
||||||
"Signature": [
|
"Signature": [
|
||||||
{
|
{
|
||||||
|
"sig": {
|
||||||
"name": "nu-python",
|
"name": "nu-python",
|
||||||
"usage": "Signature test for Python",
|
"usage": "Signature test for Python",
|
||||||
"extra_usage": "",
|
"extra_usage": "",
|
||||||
@ -79,7 +81,7 @@ 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
|
"var_id": None,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"long": "flag",
|
"long": "flag",
|
||||||
@ -105,6 +107,8 @@ def signatures():
|
|||||||
"creates_scope": False,
|
"creates_scope": False,
|
||||||
"allows_unknown_args": False,
|
"allows_unknown_args": False,
|
||||||
"category": "Experimental",
|
"category": "Experimental",
|
||||||
|
},
|
||||||
|
"examples": [],
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user