oe-python-template 0.8.21__py3-none-any.whl → 0.8.23__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
oe_python_template/cli.py CHANGED
@@ -1,7 +1,9 @@
1
1
  """CLI (Command Line Interface) of OE Python Template."""
2
2
 
3
3
  import os
4
+ import sys
4
5
  from enum import StrEnum
6
+ from pathlib import Path
5
7
  from typing import Annotated
6
8
 
7
9
  import typer
@@ -12,7 +14,7 @@ from rich.console import Console
12
14
  from . import Service, Utterance, __version__
13
15
  from .api import api_v1, api_v2
14
16
 
15
- cli = typer.Typer(name="Command Line Interface of OE Python Template")
17
+ cli = typer.Typer(help="Command Line Interface of OE Python Template")
16
18
  _service = Service()
17
19
  _console = Console()
18
20
 
@@ -129,11 +131,13 @@ def openapi(
129
131
 
130
132
 
131
133
  def _apply_cli_settings(cli: typer.Typer, epilog: str) -> None:
132
- """Add epilog to all typers in the tree and configure default behavior."""
133
- cli.info.epilog = epilog
134
+ """Configure default behavior and add epilog to all typers in the tree."""
134
135
  cli.info.no_args_is_help = True
135
- for command in cli.registered_commands:
136
- command.epilog = cli.info.epilog
136
+
137
+ if not any(arg.endswith("typer") for arg in Path(sys.argv[0]).parts):
138
+ cli.info.epilog = epilog
139
+ for command in cli.registered_commands:
140
+ command.epilog = cli.info.epilog
137
141
 
138
142
 
139
143
  _apply_cli_settings(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oe-python-template
3
- Version: 0.8.21
3
+ Version: 0.8.23
4
4
  Summary: 🧠 Copier template to scaffold Python projects compliant with best practices and modern tooling.
5
5
  Project-URL: Homepage, https://oe-python-template.readthedocs.io/en/latest/
6
6
  Project-URL: Documentation, https://oe-python-template.readthedocs.io/en/latest/
@@ -1,12 +1,12 @@
1
1
  oe_python_template/__init__.py,sha256=R49r9JJnOBe4HrPGcu37ySvguxpGzQgTM7LtlyRnUK0,436
2
2
  oe_python_template/api.py,sha256=j4LHMUDs9xAC_9Rw5p53cr5SycxqAYnGHJ1FdWI-SnY,5010
3
- oe_python_template/cli.py,sha256=p44okms9WHQfESWVGoGYwzBvAe6dX3zC_pDIMjQMx9w,3729
3
+ oe_python_template/cli.py,sha256=fCgzRpEzxZ6SeJ0DONrPpr26dkHpsmlxUEUtTPgb7tw,3852
4
4
  oe_python_template/constants.py,sha256=Z1c06l5DeRuFxYVLHihHHTYvr8_Qh0nyzVKOe5X3ZNs,350
5
5
  oe_python_template/models.py,sha256=L9uwom3TkuOpN3R30bGKEBQKcrLLEMc-O9e8VVSNTGw,838
6
6
  oe_python_template/service.py,sha256=ZMeCQOfIJP0TAD9cYgOdA1tis8NuCK8Xt8wB-xtWHmo,1634
7
7
  oe_python_template/settings.py,sha256=87VZ1IEGbV3ivDjpG6x_Mgs2inH2hVd4ZD7DGsHOYFE,743
8
- oe_python_template-0.8.21.dist-info/METADATA,sha256=bslXOoMJIp7URQT1jT8-Ztl4P_joC1ad-e3Ur1TrajQ,28650
9
- oe_python_template-0.8.21.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
- oe_python_template-0.8.21.dist-info/entry_points.txt,sha256=IroSSWhLGxus9rxcashkYQda39TTvf7LbUMYtOKXUBE,66
11
- oe_python_template-0.8.21.dist-info/licenses/LICENSE,sha256=5H409K6xzz9U5eUaoAHQExNkoWJRlU0LEj6wL2QJ34s,1113
12
- oe_python_template-0.8.21.dist-info/RECORD,,
8
+ oe_python_template-0.8.23.dist-info/METADATA,sha256=uYs9cpppCR_yIcrmBLODGxJxNSlLENxmHzIPagoRx4I,28650
9
+ oe_python_template-0.8.23.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
+ oe_python_template-0.8.23.dist-info/entry_points.txt,sha256=IroSSWhLGxus9rxcashkYQda39TTvf7LbUMYtOKXUBE,66
11
+ oe_python_template-0.8.23.dist-info/licenses/LICENSE,sha256=5H409K6xzz9U5eUaoAHQExNkoWJRlU0LEj6wL2QJ34s,1113
12
+ oe_python_template-0.8.23.dist-info/RECORD,,