Skip to content

Commit

Permalink
run isort/black
Browse files Browse the repository at this point in the history
  • Loading branch information
bckohan committed Dec 24, 2023
1 parent 00593bc commit 052a1e0
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions sphinxcontrib/typer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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

Expand All @@ -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(
Expand Down

0 comments on commit 052a1e0

Please sign in to comment.