From bec70a974d082d03c5ebb6b6bbe55ce14fc0fa87 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:26:42 +0300 Subject: [PATCH 1/2] webbrowser.open_new_tab takes a str --- tuna/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuna/cli.py b/tuna/cli.py index eaaa4d3..5308686 100644 --- a/tuna/cli.py +++ b/tuna/cli.py @@ -26,7 +26,7 @@ def main(argv=None): shutil.copytree(this_dir / "web" / "static", static_dir) if args.browser: threading.Thread( - target=lambda: webbrowser.open_new_tab(outdir / "index.html") + target=lambda: webbrowser.open_new_tab(str(outdir / "index.html")) ).start() else: start_server(args.infile, args.browser, args.port) From 7514dba81954161c7140b743045cc2932a8e3bc7 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:31:51 +0300 Subject: [PATCH 2/2] Remove redundant paretheses --- tuna/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tuna/cli.py b/tuna/cli.py index 5308686..066c9d6 100644 --- a/tuna/cli.py +++ b/tuna/cli.py @@ -34,7 +34,7 @@ def main(argv=None): def _get_parser(): """Parse input options.""" - parser = argparse.ArgumentParser(description=("Visualize Python profile.")) + parser = argparse.ArgumentParser(description="Visualize Python profile.") parser.add_argument("infile", type=str, help="input runtime or import profile file") parser.add_argument( @@ -66,6 +66,6 @@ def _get_parser(): "--version", "-v", action="version", - version="%(prog)s " + (f"(version {__version__})"), + version="%(prog)s " + f"(version {__version__})", ) return parser