prgen-cli 0.4.0__tar.gz → 0.4.1__tar.gz
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.
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/PKG-INFO +1 -1
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/pyproject.toml +1 -1
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/cli.py +12 -4
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen_cli.egg-info/PKG-INFO +1 -1
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/LICENSE +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/README.md +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/setup.cfg +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/__main__.py +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/about.py +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/api_errors.py +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/config.py +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/defaults.py +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/git_utils.py +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/http_debug.py +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/prompting.py +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/prompts/pr_description.txt +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/providers/gemini_provider.py +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/providers/ollama_provider.py +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/providers/openai_provider.py +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/ui.py +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen_cli.egg-info/SOURCES.txt +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen_cli.egg-info/dependency_links.txt +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen_cli.egg-info/entry_points.txt +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen_cli.egg-info/requires.txt +0 -0
- {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen_cli.egg-info/top_level.txt +0 -0
|
@@ -7,7 +7,6 @@ from pathlib import Path
|
|
|
7
7
|
from typing import Annotated, cast
|
|
8
8
|
|
|
9
9
|
import typer
|
|
10
|
-
from click.core import ParameterSource
|
|
11
10
|
from rich import box
|
|
12
11
|
from rich.console import Console
|
|
13
12
|
from rich.panel import Panel
|
|
@@ -42,6 +41,15 @@ from prgen.prompting import build_prompt, load_prompt_template
|
|
|
42
41
|
from prgen.ui import loading, print_pr_summary
|
|
43
42
|
|
|
44
43
|
|
|
44
|
+
def _option_from_default(ctx: typer.Context, name: str) -> bool:
|
|
45
|
+
"""True when the user did not pass the option (Click/Typer default).
|
|
46
|
+
|
|
47
|
+
Avoid importing ``click``: recent Typer vendors Click and may not install it.
|
|
48
|
+
"""
|
|
49
|
+
source = ctx.get_parameter_source(name)
|
|
50
|
+
return source is None or getattr(source, "name", "") == "DEFAULT"
|
|
51
|
+
|
|
52
|
+
|
|
45
53
|
def _version_callback(value: bool) -> None:
|
|
46
54
|
if value:
|
|
47
55
|
typer.echo(f"prgen {package_version()}")
|
|
@@ -532,11 +540,11 @@ def _root(
|
|
|
532
540
|
if ctx.invoked_subcommand is not None:
|
|
533
541
|
return
|
|
534
542
|
cfg_base, cfg_provider, cfg_tier = read_cli_defaults_from_config()
|
|
535
|
-
if ctx
|
|
543
|
+
if _option_from_default(ctx, "base") and cfg_base is not None:
|
|
536
544
|
base = cfg_base
|
|
537
|
-
if ctx
|
|
545
|
+
if _option_from_default(ctx, "provider") and cfg_provider is not None:
|
|
538
546
|
provider = cfg_provider
|
|
539
|
-
if ctx
|
|
547
|
+
if _option_from_default(ctx, "tier") and cfg_tier is not None:
|
|
540
548
|
tier = cfg_tier
|
|
541
549
|
raise typer.Exit(
|
|
542
550
|
run_summarize(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|