fix: remove legacy command definitions
This commit is contained in:
parent
1c14ad72cd
commit
ab12cba1d5
|
@ -46,10 +46,6 @@ main = "rattail_tutorial.web.app:main"
|
||||||
rattail_tutorial = "rattail_tutorial.config:Rattail_tutorialConfig"
|
rattail_tutorial = "rattail_tutorial.config:Rattail_tutorialConfig"
|
||||||
|
|
||||||
|
|
||||||
[project.entry-points."rattail_tutorial.subcommands"]
|
|
||||||
hello = "rattail_tutorial.commands:HelloWorld"
|
|
||||||
|
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Homepage = "https://rattailproject.org"
|
Homepage = "https://rattailproject.org"
|
||||||
repository = "https://kallithea.rattailproject.org/rattail-project/rattail-tutorial"
|
repository = "https://kallithea.rattailproject.org/rattail-project/rattail-tutorial"
|
||||||
|
|
|
@ -28,9 +28,7 @@ import sys
|
||||||
|
|
||||||
import typer
|
import typer
|
||||||
|
|
||||||
from rattail import commands
|
|
||||||
from rattail.commands.typer import make_typer
|
from rattail.commands.typer import make_typer
|
||||||
from rattail_tutorial import __version__
|
|
||||||
|
|
||||||
|
|
||||||
rattail_tutorial_typer = make_typer(
|
rattail_tutorial_typer = make_typer(
|
||||||
|
@ -47,33 +45,3 @@ def hello(
|
||||||
The requisite 'hello world' example
|
The requisite 'hello world' example
|
||||||
"""
|
"""
|
||||||
sys.stdout.write("hello world!\n")
|
sys.stdout.write("hello world!\n")
|
||||||
|
|
||||||
|
|
||||||
def main(*args):
|
|
||||||
"""
|
|
||||||
Main entry point for Rattail Tutorial command system
|
|
||||||
"""
|
|
||||||
args = list(args or sys.argv[1:])
|
|
||||||
cmd = Command()
|
|
||||||
cmd.run(*args)
|
|
||||||
|
|
||||||
|
|
||||||
class Command(commands.Command):
|
|
||||||
"""
|
|
||||||
Main command for Rattail Tutorial
|
|
||||||
"""
|
|
||||||
name = 'rattail_tutorial'
|
|
||||||
version = __version__
|
|
||||||
description = "Rattail Tutorial (custom Rattail system)"
|
|
||||||
long_description = ''
|
|
||||||
|
|
||||||
|
|
||||||
class HelloWorld(commands.Subcommand):
|
|
||||||
"""
|
|
||||||
The requisite 'hello world' example
|
|
||||||
"""
|
|
||||||
name = 'hello'
|
|
||||||
description = __doc__.strip()
|
|
||||||
|
|
||||||
def run(self, args):
|
|
||||||
self.stdout.write("hello world!\n")
|
|
||||||
|
|
Loading…
Reference in a new issue