wry 0.1.8.dev1__tar.gz → 0.1.9.dev1__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.
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/CHANGELOG.md +11 -1
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/PKG-INFO +1 -3
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/README.md +0 -2
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/wry/_version.py +3 -3
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/wry/click_integration.py +2 -2
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/wry/core/model.py +5 -2
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/wry.egg-info/PKG-INFO +1 -3
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/.github/workflows/ci-cd.yml +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/.gitignore +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/.markdownlint.json +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/.pre-commit-config.yaml +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/LICENSE +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/TODO.md +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/check.sh +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/examples/auto_model_example.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/examples/config.json +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/examples/intermediate_example.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/examples/multi_model_example.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/examples/simple_cli.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/examples/source_tracking_example.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/pyproject.toml +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/scripts/README.md +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/scripts/extract_release_notes.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/scripts/test_all_versions.sh +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/scripts/test_ci_locally.sh +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/scripts/test_with_act.sh +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/setup.cfg +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/README.md +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/__init__.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/features/__init__.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/features/test_auto_model.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/features/test_multi_model.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/features/test_source_precedence.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/integration/__init__.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/integration/test_click_edge_cases.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/integration/test_click_integration.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/integration/test_click_integration_extended.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/integration/test_context_handling.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/__init__.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/auto_model/__init__.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/auto_model/test_auto_model_annotation_inference.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/auto_model/test_auto_model_field_processing.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/auto_model/test_field_annotation_handling.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/auto_model/test_field_annotations.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/auto_model/test_type_inference.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/README_TESTING_STRATEGY.md +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/__init__.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_bool_flag_handling.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_click_config_building.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_click_constraint_formatting.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_click_decorator_edge_cases.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_click_interval_constraints.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_click_lambda_parsing.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_click_length_constraints.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_click_parameter_generation.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_click_predicate_handling.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_closure_extraction_errors.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_closure_handling.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_constraint_behavior.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_constraint_edge_cases.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_env_vars_option.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_json_config_loading.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_lambda_behavior.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_lambda_error_handling.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_predicate_source_errors.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_strict_mode_errors.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/click/test_type_handling.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/core/__init__.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/core/test_accessors.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/core/test_advanced_features.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/core/test_core.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/core/test_edge_cases.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/core/test_env_utils.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/core/test_field_constraint_extraction.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/core/test_field_utils.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/core/test_field_utils_edge_cases.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/core/test_sources.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/core/test_type_checking_blocks.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/model/__init__.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/model/test_accessor_caching.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/model/test_extract_edge_cases.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/model/test_model_click_context_handling.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/model/test_model_data_extraction.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/model/test_model_default_handling.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/model/test_model_environment_integration.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/model/test_model_extract_subset_edge_cases.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/model/test_model_extraction_methods.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/model/test_model_field_errors.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/model/test_model_object_extraction.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/model/test_non_dict_object_extraction.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/model/test_object_attribute_extraction.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/multi_model/__init__.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/multi_model/test_multi_model.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/multi_model/test_type_checking.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/test_auto_model_field_processing.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/test_comprehensive_imports.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/test_generate_click_classmethod.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/test_init.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/test_init_edge_cases.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/test_init_version_edge_cases.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/test_model_extraction_methods.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/test_type_checking_imports.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/test_version_fallback.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/test_version_parsing.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/wry/__init__.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/wry/auto_model.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/wry/core/__init__.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/wry/core/accessors.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/wry/core/env_utils.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/wry/core/field_utils.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/wry/core/sources.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/wry/multi_model.py +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/wry/py.typed +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/wry.egg-info/SOURCES.txt +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/wry.egg-info/dependency_links.txt +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/wry.egg-info/requires.txt +0 -0
- {wry-0.1.8.dev1 → wry-0.1.9.dev1}/wry.egg-info/top_level.txt +0 -0
|
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.1.8] - 2025-09-10
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Improved type annotations for `generate_click_parameters` decorator
|
|
15
|
+
- Now uses Click's `FC` TypeVar to preserve function types through decorator chain
|
|
16
|
+
- Fixes pyright `reportUntypedFunctionDecorator` warnings
|
|
17
|
+
- Maintains proper type inference for decorated functions
|
|
18
|
+
|
|
10
19
|
## [0.1.7] - 2025-09-09
|
|
11
20
|
|
|
12
21
|
### Added
|
|
@@ -135,7 +144,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
135
144
|
|
|
136
145
|
- Initial version as `drycli` package (before rename to `wry`)
|
|
137
146
|
|
|
138
|
-
[Unreleased]: https://github.com/tahouse/wry/compare/v0.1.
|
|
147
|
+
[Unreleased]: https://github.com/tahouse/wry/compare/v0.1.8...HEAD
|
|
148
|
+
[0.1.8]: https://github.com/tahouse/wry/compare/v0.1.7...v0.1.8
|
|
139
149
|
[0.1.7]: https://github.com/tahouse/wry/compare/v0.1.6...v0.1.7
|
|
140
150
|
[0.1.6]: https://github.com/tahouse/wry/compare/v0.1.5...v0.1.6
|
|
141
151
|
[0.1.5]: https://github.com/tahouse/wry/compare/v0.1.4...v0.1.5
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wry
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.9.dev1
|
|
4
4
|
Summary: Why Repeat Yourself? - Define your CLI once with Pydantic models
|
|
5
5
|
Author-email: Tyler House <26489166+tahouse@users.noreply.github.com>
|
|
6
6
|
License: MIT
|
|
@@ -243,8 +243,6 @@ class QuickConfig(AutoWryModel):
|
|
|
243
243
|
age: int = Field(default=30, ge=0, le=120)
|
|
244
244
|
email: str = Field(description="Your email")
|
|
245
245
|
|
|
246
|
-
# No need for Annotated[..., AutoOption]!
|
|
247
|
-
|
|
248
246
|
@click.command()
|
|
249
247
|
@generate_click_parameters(QuickConfig)
|
|
250
248
|
def quickstart(config: QuickConfig):
|
|
@@ -197,8 +197,6 @@ class QuickConfig(AutoWryModel):
|
|
|
197
197
|
age: int = Field(default=30, ge=0, le=120)
|
|
198
198
|
email: str = Field(description="Your email")
|
|
199
199
|
|
|
200
|
-
# No need for Annotated[..., AutoOption]!
|
|
201
|
-
|
|
202
200
|
@click.command()
|
|
203
201
|
@generate_click_parameters(QuickConfig)
|
|
204
202
|
def quickstart(config: QuickConfig):
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.1.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 1,
|
|
31
|
+
__version__ = version = '0.1.9.dev1'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 1, 9, 'dev1')
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'gb6776c480'
|
|
@@ -314,7 +314,7 @@ def generate_click_parameters(
|
|
|
314
314
|
model_class: type[BaseModel],
|
|
315
315
|
add_config_option: bool = True,
|
|
316
316
|
strict: bool = True,
|
|
317
|
-
) -> Callable[
|
|
317
|
+
) -> Callable[[FC], FC]:
|
|
318
318
|
"""Generate Click options and arguments with smart auto-generation.
|
|
319
319
|
|
|
320
320
|
This decorator automatically generates Click CLI parameters from a Pydantic
|
|
@@ -508,7 +508,7 @@ def generate_click_parameters(
|
|
|
508
508
|
)
|
|
509
509
|
)
|
|
510
510
|
|
|
511
|
-
def decorator(func:
|
|
511
|
+
def decorator(func: FC) -> FC:
|
|
512
512
|
# Check for duplicate decorator application
|
|
513
513
|
if hasattr(func, "_wry_models"):
|
|
514
514
|
existing_models = getattr(func, "_wry_models", [])
|
|
@@ -3,12 +3,15 @@
|
|
|
3
3
|
import json
|
|
4
4
|
from collections.abc import Callable
|
|
5
5
|
from pathlib import Path
|
|
6
|
-
from typing import Any, ClassVar, TypeVar, cast
|
|
6
|
+
from typing import TYPE_CHECKING, Any, ClassVar, TypeVar, cast
|
|
7
7
|
|
|
8
8
|
import click
|
|
9
9
|
from pydantic import BaseModel, ConfigDict
|
|
10
10
|
from pydantic_core import PydanticUndefined
|
|
11
11
|
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from click.decorators import FC
|
|
14
|
+
|
|
12
15
|
from .accessors import (
|
|
13
16
|
ConstraintsAccessor,
|
|
14
17
|
DefaultsAccessor,
|
|
@@ -633,7 +636,7 @@ class WryModel(BaseModel):
|
|
|
633
636
|
return result
|
|
634
637
|
|
|
635
638
|
@classmethod
|
|
636
|
-
def generate_click_parameters(cls) -> Callable:
|
|
639
|
+
def generate_click_parameters(cls) -> "Callable[[FC], FC]":
|
|
637
640
|
"""Generate Click parameters decorator for this model.
|
|
638
641
|
|
|
639
642
|
This is a convenience method that allows using the decorator
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wry
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.9.dev1
|
|
4
4
|
Summary: Why Repeat Yourself? - Define your CLI once with Pydantic models
|
|
5
5
|
Author-email: Tyler House <26489166+tahouse@users.noreply.github.com>
|
|
6
6
|
License: MIT
|
|
@@ -243,8 +243,6 @@ class QuickConfig(AutoWryModel):
|
|
|
243
243
|
age: int = Field(default=30, ge=0, le=120)
|
|
244
244
|
email: str = Field(description="Your email")
|
|
245
245
|
|
|
246
|
-
# No need for Annotated[..., AutoOption]!
|
|
247
|
-
|
|
248
246
|
@click.command()
|
|
249
247
|
@generate_click_parameters(QuickConfig)
|
|
250
248
|
def quickstart(config: QuickConfig):
|
|
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
|
|
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
|
{wry-0.1.8.dev1 → wry-0.1.9.dev1}/tests/unit/auto_model/test_auto_model_annotation_inference.py
RENAMED
|
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
|
|
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
|
|
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
|
|
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
|