File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import typer
44from rich import print
55from typer import Context
6+ from typer .core import TyperGroup
67
78from devcli .config import Config
89from devcli .core import (
1213 load_dynamic_commands ,
1314)
1415
15- cli = typer .Typer (add_completion = False , name = "devcli" )
16+
17+ class OrderedGroup (TyperGroup ):
18+ def list_commands (self , ctx ):
19+ return sorted (self .commands )
20+
21+
22+ cli = typer .Typer (add_completion = False , name = "devcli" , cls = OrderedGroup )
1623
1724# config is a singleton to be
1825# available to all parts of the system
@@ -35,7 +42,7 @@ def show_version():
3542 """
3643 Show devcli version which is defined in pyproject.toml file
3744
38- :return: tool.poetry .version
45+ :return: project .version
3946 """
4047 project_conf = boot_conf .add_config (project_root ("pyproject.toml" ))
4148 print (f"devcli version { project_conf ['project.version' ]} " )
You can’t perform that action at this time.
0 commit comments