Fix issues in arcade show (#117)
# PR Description 1. `arcade show` only supported lowercase args for toolkit and tools. This PR allows the user to use capitalization and the tool/toolkit will still be displayed. 2. `arcade show -T` is now for showing a toolkit and `arcade show -t` is now for showing a tool.
This commit is contained in:
parent
80b7d968ff
commit
ce0616a471
2 changed files with 5 additions and 4 deletions
|
|
@ -131,10 +131,10 @@ def new(
|
||||||
)
|
)
|
||||||
def show(
|
def show(
|
||||||
toolkit: Optional[str] = typer.Option(
|
toolkit: Optional[str] = typer.Option(
|
||||||
None, "-t", "--toolkit", help="The toolkit to show the tools of"
|
None, "-T", "--toolkit", help="The toolkit to show the tools of"
|
||||||
),
|
),
|
||||||
tool: Optional[str] = typer.Option(
|
tool: Optional[str] = typer.Option(
|
||||||
None, "-T", "--tool", help="The specific tool to show details for"
|
None, "-t", "--tool", help="The specific tool to show details for"
|
||||||
),
|
),
|
||||||
host: Optional[str] = typer.Option(
|
host: Optional[str] = typer.Option(
|
||||||
None,
|
None,
|
||||||
|
|
@ -177,8 +177,8 @@ def show(
|
||||||
(
|
(
|
||||||
t
|
t
|
||||||
for t in tools
|
for t in tools
|
||||||
if t.get_fully_qualified_name().name == tool
|
if t.get_fully_qualified_name().name.lower() == tool.lower()
|
||||||
or str(t.get_fully_qualified_name()) == tool
|
or str(t.get_fully_qualified_name()).lower() == tool.lower()
|
||||||
),
|
),
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ def create_cli_catalog(
|
||||||
Load toolkits from the python environment.
|
Load toolkits from the python environment.
|
||||||
"""
|
"""
|
||||||
if toolkit:
|
if toolkit:
|
||||||
|
toolkit = toolkit.lower()
|
||||||
try:
|
try:
|
||||||
prefixed_toolkit = "arcade_" + toolkit
|
prefixed_toolkit = "arcade_" + toolkit
|
||||||
toolkits = [Toolkit.from_package(prefixed_toolkit)]
|
toolkits = [Toolkit.from_package(prefixed_toolkit)]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue