pysae-cli-tools 0.1.2__tar.gz → 0.1.3__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.
- {pysae_cli_tools-0.1.2 → pysae_cli_tools-0.1.3}/PKG-INFO +1 -1
- {pysae_cli_tools-0.1.2 → pysae_cli_tools-0.1.3}/pyproject.toml +1 -1
- {pysae_cli_tools-0.1.2 → pysae_cli_tools-0.1.3}/pysae_cli_tools/k8s/runner.py +20 -2
- {pysae_cli_tools-0.1.2 → pysae_cli_tools-0.1.3}/README.md +0 -0
- {pysae_cli_tools-0.1.2 → pysae_cli_tools-0.1.3}/pysae_cli_tools/__init__.py +0 -0
- {pysae_cli_tools-0.1.2 → pysae_cli_tools-0.1.3}/pysae_cli_tools/k8s/__init__.py +0 -0
- {pysae_cli_tools-0.1.2 → pysae_cli_tools-0.1.3}/pysae_cli_tools/k8s/config.py +0 -0
|
@@ -30,7 +30,7 @@ import tempfile
|
|
|
30
30
|
import uuid
|
|
31
31
|
from collections.abc import Callable
|
|
32
32
|
from pathlib import Path
|
|
33
|
-
from typing import Annotated, Any, NoReturn, TypeVar
|
|
33
|
+
from typing import Annotated, Any, NoReturn, Protocol, TypeVar
|
|
34
34
|
|
|
35
35
|
from typer import Option
|
|
36
36
|
|
|
@@ -776,7 +776,25 @@ def k8s_support(
|
|
|
776
776
|
return decorator
|
|
777
777
|
|
|
778
778
|
|
|
779
|
-
|
|
779
|
+
class K8sSupportDecorator(Protocol):
|
|
780
|
+
"""Callable shape returned by :func:`build_k8s_support`.
|
|
781
|
+
|
|
782
|
+
Lets mypy preserve the decorated function's signature in callers —
|
|
783
|
+
a plain ``Callable[..., Callable[[F], F]]`` would erase it and trip
|
|
784
|
+
``untyped-decorator`` in strict mode.
|
|
785
|
+
"""
|
|
786
|
+
|
|
787
|
+
def __call__(
|
|
788
|
+
self,
|
|
789
|
+
*,
|
|
790
|
+
cli_module: str | None = None,
|
|
791
|
+
cli_subcommand: Any = ...,
|
|
792
|
+
pod_name_prefix: str | None = None,
|
|
793
|
+
tty: bool | None = None,
|
|
794
|
+
) -> Callable[[F], F]: ...
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
def build_k8s_support(config: K8sConfig) -> K8sSupportDecorator:
|
|
780
798
|
"""Return a :func:`k8s_support` decorator pre-bound to ``config``.
|
|
781
799
|
|
|
782
800
|
Typical setup at the top of a project's ``cli.py``::
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|