Move self-update command definition to cli.py
MODIFY
plextraktsync/cli.py
plextraktsync/cli.py
import click
-from plextraktsync.commands.self_update import enable_self_update, self_update
+from plextraktsync.commands.self_update import enable_self_update
from plextraktsync.factory import factory
CONFIG = factory.config()
@@ -237,6 +237,19 @@ def subdl():
pass
+@command()
+def self_update():
+ """
+ Update PlexTraktSync to the latest version using pipx
+
+ \b
+ $ plextraktsync self-update
+ Updating PlexTraktSync to latest using pipx
+ upgraded package plextraktsync from 0.15.3 to 0.18.5 (location: /Users/glen/.local/pipx/venvs/plextraktsync)
+ """
+ pass
+
+
@command()
def bug_report():
"""

MODIFY
plextraktsync/commands/self_update.py
plextraktsync/commands/self_update.py
@@ -36,16 +36,6 @@ def enable_self_update():
return package is not None
-@click.command()
def self_update():
- """
- Update PlexTraktSync to latest version using pipx
-
- \b
- $ plextraktsync self-update
- Updating PlexTraktSync to latest using pipx
- upgraded package plextraktsync from 0.15.3 to 0.18.5 (location: /Users/glen/.local/pipx/venvs/plextraktsync)
- """
-
- click.echo("Updating PlexTraktSync to latest using pipx")
+ click.echo("Updating PlexTraktSync to the latest version using pipx")
system("pipx upgrade PlexTraktSync")

Move self-update command definition to cli.py