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.
Files changed (25) hide show
  1. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/PKG-INFO +1 -1
  2. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/pyproject.toml +1 -1
  3. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/cli.py +12 -4
  4. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen_cli.egg-info/PKG-INFO +1 -1
  5. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/LICENSE +0 -0
  6. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/README.md +0 -0
  7. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/setup.cfg +0 -0
  8. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/__main__.py +0 -0
  9. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/about.py +0 -0
  10. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/api_errors.py +0 -0
  11. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/config.py +0 -0
  12. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/defaults.py +0 -0
  13. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/git_utils.py +0 -0
  14. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/http_debug.py +0 -0
  15. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/prompting.py +0 -0
  16. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/prompts/pr_description.txt +0 -0
  17. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/providers/gemini_provider.py +0 -0
  18. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/providers/ollama_provider.py +0 -0
  19. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/providers/openai_provider.py +0 -0
  20. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen/ui.py +0 -0
  21. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen_cli.egg-info/SOURCES.txt +0 -0
  22. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen_cli.egg-info/dependency_links.txt +0 -0
  23. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen_cli.egg-info/entry_points.txt +0 -0
  24. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen_cli.egg-info/requires.txt +0 -0
  25. {prgen_cli-0.4.0 → prgen_cli-0.4.1}/src/prgen_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prgen-cli
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Generate PR titles and descriptions from git diff using LLMs
5
5
  Author: Jean Paul Fernandez
6
6
  License-Expression: GPL-3.0-only
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "prgen-cli"
3
- version = "0.4.0"
3
+ version = "0.4.1"
4
4
  description = "Generate PR titles and descriptions from git diff using LLMs"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -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.get_parameter_source("base") == ParameterSource.DEFAULT and cfg_base is not None:
543
+ if _option_from_default(ctx, "base") and cfg_base is not None:
536
544
  base = cfg_base
537
- if ctx.get_parameter_source("provider") == ParameterSource.DEFAULT and cfg_provider is not None:
545
+ if _option_from_default(ctx, "provider") and cfg_provider is not None:
538
546
  provider = cfg_provider
539
- if ctx.get_parameter_source("tier") == ParameterSource.DEFAULT and cfg_tier is not None:
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(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prgen-cli
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Generate PR titles and descriptions from git diff using LLMs
5
5
  Author: Jean Paul Fernandez
6
6
  License-Expression: GPL-3.0-only
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes