Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump textual and switch to Whoosh-Reloaded #221

Merged
merged 2 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ dependencies = [
"pyobjc==11.0; sys_platform=='darwin'",
"rich==13.9.4",
"simpleaudio==1.0.4; sys_platform=='darwin'",
"textual==0.85.2",
"textual==1.0.0",
"Twisted==24.11.0",
"Whoosh==2.7.4",
"Whoosh-Reloaded==2.7.5",
]

# Authors/maintainers
Expand Down
20 changes: 1 addition & 19 deletions src/transmissions/ext/click.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,16 @@

import click
from attrs import Factory, mutable
from click import UsageError, option
from click import UsageError


__all__ = (
"ClickTestResult",
"clickTestRun",
"composedOptions",
"readConfig",
"trialRunOption",
)


def composedOptions(*options: Callable[..., Callable]) -> Callable[..., Callable]:
"""
Combines options decorators into a single decorator.
"""

def wrapper(f: Callable) -> Callable:
for o in reversed(options):
f = o(f)
return f

return wrapper


trialRunOption = option("--trial-run", help="Trial run only", is_flag=True)


class Internal(Enum):
UNSET = auto()

Expand Down
4 changes: 0 additions & 4 deletions src/transmissions/tui/_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class Application(App):
"""

BINDINGS: ClassVar = [
("d", "dark", "Toggle dark mode"),
("q", "quit", "Quit application"),
]

Expand All @@ -39,6 +38,3 @@ def on_mount(self) -> None:

async def action_quit(self) -> None:
self.exit()

async def action_dark(self) -> None:
self.dark = not self.dark
Loading
Loading