From 052a1e0796c69edf7412fca206e9688f5129f998 Mon Sep 17 00:00:00 2001 From: Brian Kohan Date: Sun, 24 Dec 2023 14:01:07 -0800 Subject: [PATCH] run isort/black --- sphinxcontrib/typer/__init__.py | 47 ++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/sphinxcontrib/typer/__init__.py b/sphinxcontrib/typer/__init__.py index ef3e452..c905083 100644 --- a/sphinxcontrib/typer/__init__.py +++ b/sphinxcontrib/typer/__init__.py @@ -56,25 +56,26 @@ def _filter_commands( - ctx: click.Context, - cmd_filter: t.Optional[t.List[str]] = None + ctx: click.Context, cmd_filter: t.Optional[t.List[str]] = None ): - return sorted([ - cmd for name, cmd in getattr( - ctx.command, - 'commands', - { - name: - ctx.command.get_command(ctx, name) - for name in getattr( - ctx.command, - 'list_commands', - lambda _: [] - )(ctx) or cmd_filter - } - ).items() - if not cmd_filter or name in cmd_filter - ], key=lambda item: item.name) + return sorted( + [ + cmd + for name, cmd in getattr( + ctx.command, + 'commands', + { + name: ctx.command.get_command(ctx, name) + for name in getattr( + ctx.command, 'list_commands', lambda _: [] + )(ctx) + or cmd_filter + }, + ).items() + if not cmd_filter or name in cmd_filter + ], + key=lambda item: item.name, + ) class RenderTarget(str, Enum): @@ -752,7 +753,9 @@ def chrome(): ) def chromium(): - from selenium.webdriver.chrome.service import Service as ChromiumService + from selenium.webdriver.chrome.service import ( + Service as ChromiumService, + ) from webdriver_manager.chrome import ChromeDriverManager from webdriver_manager.core.os_manager import ChromeType @@ -764,9 +767,11 @@ def chromium(): ) def firefox(): - from selenium.webdriver.firefox.options import Options from selenium import webdriver - from selenium.webdriver.firefox.service import Service as FirefoxService + from selenium.webdriver.firefox.options import Options + from selenium.webdriver.firefox.service import ( + Service as FirefoxService, + ) from webdriver_manager.firefox import GeckoDriverManager return webdriver.Firefox(