@@ -44,9 +44,7 @@ def list_plugins():
4444def install (
4545 name : Annotated [
4646 str ,
47- typer .Argument (
48- help = "Name of the plugin to install, excluding the `minimal-pba-cli-plugin-` prefix."
49- ),
47+ typer .Argument (help = "Name of the plugin to install, excluding the `minimal-pba-cli-plugin-` prefix." ),
5048 ],
5149):
5250 """Install a published plugin."""
@@ -69,9 +67,7 @@ def install(
6967 _ , version_to_install , _ = get_latest_version (f"minimal-pba-cli-plugin-{ name } " )
7068 except HTTPError as e :
7169 if e .response is not None and e .response .status_code == 404 :
72- raise typer .BadParameter (
73- f"Plugin '{ name } ' not found."
74- ) from None
70+ raise typer .BadParameter (f"Plugin '{ name } ' not found." ) from None
7571
7672 typer .echo (f"Installing plugin '{ name } ' version '{ version_to_install } '..." )
7773
@@ -92,27 +88,35 @@ def install_local(path: Annotated[Path, typer.Argument(help="Path to the plugin
9288 """Install a local plugin."""
9389
9490 typer .echo (f"Installing plugin from '{ path } '..." )
95- run_external_subprocess ([
96- "pipx" ,
97- "inject" ,
98- "--editable" ,
99- "--force" ,
100- "minimal-pba-cli" ,
101- str (path ),
102- ])
91+ run_external_subprocess (
92+ [
93+ "pipx" ,
94+ "inject" ,
95+ "--editable" ,
96+ "--force" ,
97+ "minimal-pba-cli" ,
98+ str (path ),
99+ ]
100+ )
103101
104102
105103@plugin .command ()
106- def uninstall (name : Annotated [str , typer .Argument (help = "Name of the plugin to uninstall, excluding the `minimal-pba-cli-plugin-` prefix." )]):
104+ def uninstall (
105+ name : Annotated [
106+ str , typer .Argument (help = "Name of the plugin to uninstall, excluding the `minimal-pba-cli-plugin-` prefix." )
107+ ],
108+ ):
107109 """Uninstall a plugin."""
108110
109111 typer .echo (f"Uninstalling plugin '{ name } '..." )
110- run_external_subprocess ([
111- "pipx" ,
112- "uninject" ,
113- "minimal-pba-cli" ,
114- f"minimal-pba-cli-plugin-{ name } " ,
115- ])
112+ run_external_subprocess (
113+ [
114+ "pipx" ,
115+ "uninject" ,
116+ "minimal-pba-cli" ,
117+ f"minimal-pba-cli-plugin-{ name } " ,
118+ ]
119+ )
116120
117121
118122def _get_installed_version (name : str ) -> Version | None :
@@ -177,7 +181,10 @@ def _get_packages_matching_name(prefix: str) -> list[dict[str, str]]:
177181 fg = typer .colors .RED ,
178182 )
179183 raise typer .Exit (1 )
180- results = requests .get ("https://libraries.io/api/search" , params = {"q" : prefix , "platforms" : "pypi" , "api_key" : os .getenv ("LIBRARIES_IO_API_KEY" )})
184+ results = requests .get (
185+ "https://libraries.io/api/search" ,
186+ params = {"q" : prefix , "platforms" : "pypi" , "api_key" : os .getenv ("LIBRARIES_IO_API_KEY" )},
187+ )
181188 return [
182189 {
183190 "name" : package ["name" ],
0 commit comments