We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dade4d2 commit 0b45722Copy full SHA for 0b45722
pyinfra/api/deploy.py
@@ -60,6 +60,14 @@ def deploy(name: Optional[str] = None, data_defaults=None):
60
and wraps any operations called inside with any deploy-wide kwargs/data.
61
"""
62
63
+ if name and not isinstance(name, str):
64
+ raise PyinfraError(
65
+ (
66
+ "The `deploy` decorator must be called, ie `@deploy()`, "
67
+ "see: https://docs.pyinfra.com/en/3.x/compatibility.html#upgrading-pyinfra-from-2-x-3-x"
68
+ )
69
70
+
71
def decorator(func: Callable[P, Any]) -> PyinfraOperation[P]:
72
func.deploy_name = name or func.__name__ # type: ignore[attr-defined]
73
if data_defaults:
0 commit comments