Skip to content

Commit

Permalink
Fix type annotation for transformations
Browse files Browse the repository at this point in the history
  • Loading branch information
justinvp committed Aug 19, 2020
1 parent f4cc4cf commit 0225ea3
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 35 deletions.
14 changes: 7 additions & 7 deletions provider/pkg/gen/python-templates/helm/v2/helm.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ class BaseChartOpts:
Optional overrides for chart values.
"""

transformations: Optional[List[Callable]]
transformations: Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]]
"""
Optional list of transformations to apply to resources that will be created by this chart prior to
creation. Allows customization of the chart behaviour without directly modifying the chart itself.
Expand All @@ -384,12 +384,12 @@ class BaseChartOpts:
def __init__(self,
namespace: Optional[pulumi.Input[str]] = None,
values: Optional[pulumi.Inputs] = None,
transformations: Optional[pulumi.Inputs] = None,
transformations: Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] = None,
resource_prefix: Optional[str] = None):
"""
:param Optional[pulumi.Input[str]] namespace: Optional namespace to install chart resources into.
:param Optional[pulumi.Inputs] values: Optional overrides for chart values.
:param Optional[List[Tuple[Callable, Optional[pulumi.ResourceOptions]]]] transformations: Optional list
:param Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] transformations: Optional list
of transformations to apply to resources that will be created by this chart prior to creation.
Allows customization of the chart behaviour without directly modifying the chart itself.
:param Optional[str] resource_prefix: An optional prefix for the auto-generated resource names.
Expand Down Expand Up @@ -433,7 +433,7 @@ def __init__(self,
chart: pulumi.Input[str],
namespace: Optional[pulumi.Input[str]] = None,
values: Optional[pulumi.Inputs] = None,
transformations: Optional[pulumi.Inputs] = None,
transformations: Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] = None,
resource_prefix: Optional[str] = None,
repo: Optional[pulumi.Input[str]] = None,
version: Optional[pulumi.Input[str]] = None,
Expand All @@ -445,7 +445,7 @@ def __init__(self,
Example: chart: "stable/nginx-ingress" -> "stable/nginx-ingress"
:param Optional[pulumi.Input[str]] namespace: Optional namespace to install chart resources into.
:param Optional[pulumi.Inputs] values: Optional overrides for chart values.
:param Optional[List[Tuple[Callable, Optional[pulumi.ResourceOptions]]]] transformations: Optional list of
:param Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] transformations: Optional list of
transformations to apply to resources that will be created by this chart prior to creation.
Allows customization of the chart behaviour without directly modifying the chart itself.
:param Optional[str] resource_prefix: An optional prefix for the auto-generated resource names.
Expand Down Expand Up @@ -478,14 +478,14 @@ def __init__(self,
path: pulumi.Input[str],
namespace: Optional[pulumi.Input[str]] = None,
values: Optional[pulumi.Inputs] = None,
transformations: Optional[pulumi.Inputs] = None,
transformations: Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] = None,
resource_prefix: Optional[str] = None):
"""
:param pulumi.Input[str] path: The path to the chart directory which contains the
`Chart.yaml` file.
:param Optional[pulumi.Input[str]] namespace: Optional namespace to install chart resources into.
:param Optional[pulumi.Inputs] values: Optional overrides for chart values.
:param Optional[List[Tuple[Callable, Optional[pulumi.ResourceOptions]]]] transformations: Optional list of
:param Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] transformations: Optional list of
transformations to apply to resources that will be created by this chart prior to creation.
Allows customization of the chart behaviour without directly modifying the chart itself.
:param Optional[str] resource_prefix: An optional prefix for the auto-generated resource names.
Expand Down
6 changes: 3 additions & 3 deletions provider/pkg/gen/python-templates/kustomize/kustomize.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# *** WARNING: this file was generated by the Pulumi Kubernetes codegen tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

from typing import Callable, List, Optional, Tuple
from typing import Any, Callable, List, Optional

import pulumi.runtime
import pulumi_kubernetes as k8s
Expand All @@ -21,7 +21,7 @@ def __init__(self,
name: str,
directory: str,
opts: Optional[pulumi.ResourceOptions] = None,
transformations: Optional[List[Tuple[Callable, Optional[pulumi.ResourceOptions]]]] = None,
transformations: Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] = None,
resource_prefix: Optional[str] = None):
"""
Directory is a component representing a collection of resources described by a kustomize directory
Expand Down Expand Up @@ -89,7 +89,7 @@ def omit_resource(obj, opts):
Example: ./helloWorld
Example: https://github.com/kubernetes-sigs/kustomize/tree/master/examples/helloWorld
:param Optional[pulumi.ResourceOptions] opts: A bag of optional settings that control a resource's behavior.
:param Optional[List[Tuple[Callable, Optional[pulumi.ResourceOptions]]]] transformations: A set of
:param Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] transformations: A set of
transformations to apply to Kubernetes resource definitions before registering with engine.
:param Optional[str] resource_prefix: An optional prefix for the auto-generated resource names.
Example: A resource created with resource_prefix="foo" would produce a resource named "foo-resourceName".
Expand Down
8 changes: 4 additions & 4 deletions provider/pkg/gen/python-templates/yaml/yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ConfigGroup(pulumi.ComponentResource):
files: Optional[List[str]] = None,
yaml: Optional[List[str]] = None,
opts: Optional[pulumi.ResourceOptions] = None,
transformations: Optional[List[Tuple[Callable, Optional[pulumi.ResourceOptions]]]] = None,
transformations: Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] = None,
resource_prefix: Optional[str] = None):
"""
ConfigGroup creates a set of Kubernetes resources from Kubernetes YAML text. The YAML text
Expand Down Expand Up @@ -136,7 +136,7 @@ class ConfigGroup(pulumi.ComponentResource):
:param Optional[List[str]] files: Set of paths or a URLs that uniquely identify files.
:param Optional[List[str]] yaml: YAML text containing Kubernetes resource definitions.
:param Optional[pulumi.ResourceOptions] opts: A bag of optional settings that control a resource's behavior.
:param Optional[List[Tuple[Callable, Optional[pulumi.ResourceOptions]]]] transformations: A set of
:param Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] transformations: A set of
transformations to apply to Kubernetes resource definitions before registering with engine.
:param Optional[str] resource_prefix: An optional prefix for the auto-generated resource names.
Example: A resource created with resource_prefix="foo" would produce a resource named "foo-resourceName".
Expand Down Expand Up @@ -232,7 +232,7 @@ class ConfigFile(pulumi.ComponentResource):
name: str,
file: Optional[str] = None,
opts: Optional[pulumi.ResourceOptions] = None,
transformations: Optional[List[Tuple[Callable, Optional[pulumi.ResourceOptions]]]] = None,
transformations: Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] = None,
resource_prefix: Optional[str] = None,
file_id: Optional[str] = None):
"""
Expand Down Expand Up @@ -288,7 +288,7 @@ class ConfigFile(pulumi.ComponentResource):
:param str name: A name for a resource.
:param Optional[str] file: Path or a URL that uniquely identifies a file.
:param Optional[pulumi.ResourceOptions] opts: A bag of optional settings that control a resource's behavior.
:param Optional[List[Tuple[Callable, Optional[pulumi.ResourceOptions]]]] transformations: A set of
:param Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] transformations: A set of
transformations to apply to Kubernetes resource definitions before registering with engine.
:param Optional[str] resource_prefix: An optional prefix for the auto-generated resource names.
Example: A resource created with resource_prefix="foo" would produce a resource named "foo-resourceName".
Expand Down
14 changes: 7 additions & 7 deletions sdk/python/pulumi_kubernetes/helm/v2/helm.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ class BaseChartOpts:
Optional overrides for chart values.
"""

transformations: Optional[List[Callable]]
transformations: Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]]
"""
Optional list of transformations to apply to resources that will be created by this chart prior to
creation. Allows customization of the chart behaviour without directly modifying the chart itself.
Expand All @@ -384,12 +384,12 @@ class BaseChartOpts:
def __init__(self,
namespace: Optional[pulumi.Input[str]] = None,
values: Optional[pulumi.Inputs] = None,
transformations: Optional[pulumi.Inputs] = None,
transformations: Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] = None,
resource_prefix: Optional[str] = None):
"""
:param Optional[pulumi.Input[str]] namespace: Optional namespace to install chart resources into.
:param Optional[pulumi.Inputs] values: Optional overrides for chart values.
:param Optional[List[Tuple[Callable, Optional[pulumi.ResourceOptions]]]] transformations: Optional list
:param Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] transformations: Optional list
of transformations to apply to resources that will be created by this chart prior to creation.
Allows customization of the chart behaviour without directly modifying the chart itself.
:param Optional[str] resource_prefix: An optional prefix for the auto-generated resource names.
Expand Down Expand Up @@ -433,7 +433,7 @@ def __init__(self,
chart: pulumi.Input[str],
namespace: Optional[pulumi.Input[str]] = None,
values: Optional[pulumi.Inputs] = None,
transformations: Optional[pulumi.Inputs] = None,
transformations: Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] = None,
resource_prefix: Optional[str] = None,
repo: Optional[pulumi.Input[str]] = None,
version: Optional[pulumi.Input[str]] = None,
Expand All @@ -445,7 +445,7 @@ def __init__(self,
Example: chart: "stable/nginx-ingress" -> "stable/nginx-ingress"
:param Optional[pulumi.Input[str]] namespace: Optional namespace to install chart resources into.
:param Optional[pulumi.Inputs] values: Optional overrides for chart values.
:param Optional[List[Tuple[Callable, Optional[pulumi.ResourceOptions]]]] transformations: Optional list of
:param Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] transformations: Optional list of
transformations to apply to resources that will be created by this chart prior to creation.
Allows customization of the chart behaviour without directly modifying the chart itself.
:param Optional[str] resource_prefix: An optional prefix for the auto-generated resource names.
Expand Down Expand Up @@ -478,14 +478,14 @@ def __init__(self,
path: pulumi.Input[str],
namespace: Optional[pulumi.Input[str]] = None,
values: Optional[pulumi.Inputs] = None,
transformations: Optional[pulumi.Inputs] = None,
transformations: Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] = None,
resource_prefix: Optional[str] = None):
"""
:param pulumi.Input[str] path: The path to the chart directory which contains the
`Chart.yaml` file.
:param Optional[pulumi.Input[str]] namespace: Optional namespace to install chart resources into.
:param Optional[pulumi.Inputs] values: Optional overrides for chart values.
:param Optional[List[Tuple[Callable, Optional[pulumi.ResourceOptions]]]] transformations: Optional list of
:param Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] transformations: Optional list of
transformations to apply to resources that will be created by this chart prior to creation.
Allows customization of the chart behaviour without directly modifying the chart itself.
:param Optional[str] resource_prefix: An optional prefix for the auto-generated resource names.
Expand Down
14 changes: 7 additions & 7 deletions sdk/python/pulumi_kubernetes/helm/v3/helm.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ class BaseChartOpts:
Optional overrides for chart values.
"""

transformations: Optional[List[Callable]]
transformations: Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]]
"""
Optional list of transformations to apply to resources that will be created by this chart prior to
creation. Allows customization of the chart behaviour without directly modifying the chart itself.
Expand All @@ -384,12 +384,12 @@ class BaseChartOpts:
def __init__(self,
namespace: Optional[pulumi.Input[str]] = None,
values: Optional[pulumi.Inputs] = None,
transformations: Optional[pulumi.Inputs] = None,
transformations: Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] = None,
resource_prefix: Optional[str] = None):
"""
:param Optional[pulumi.Input[str]] namespace: Optional namespace to install chart resources into.
:param Optional[pulumi.Inputs] values: Optional overrides for chart values.
:param Optional[List[Tuple[Callable, Optional[pulumi.ResourceOptions]]]] transformations: Optional list
:param Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] transformations: Optional list
of transformations to apply to resources that will be created by this chart prior to creation.
Allows customization of the chart behaviour without directly modifying the chart itself.
:param Optional[str] resource_prefix: An optional prefix for the auto-generated resource names.
Expand Down Expand Up @@ -433,7 +433,7 @@ def __init__(self,
chart: pulumi.Input[str],
namespace: Optional[pulumi.Input[str]] = None,
values: Optional[pulumi.Inputs] = None,
transformations: Optional[pulumi.Inputs] = None,
transformations: Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] = None,
resource_prefix: Optional[str] = None,
repo: Optional[pulumi.Input[str]] = None,
version: Optional[pulumi.Input[str]] = None,
Expand All @@ -445,7 +445,7 @@ def __init__(self,
Example: chart: "stable/nginx-ingress" -> "stable/nginx-ingress"
:param Optional[pulumi.Input[str]] namespace: Optional namespace to install chart resources into.
:param Optional[pulumi.Inputs] values: Optional overrides for chart values.
:param Optional[List[Tuple[Callable, Optional[pulumi.ResourceOptions]]]] transformations: Optional list of
:param Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] transformations: Optional list of
transformations to apply to resources that will be created by this chart prior to creation.
Allows customization of the chart behaviour without directly modifying the chart itself.
:param Optional[str] resource_prefix: An optional prefix for the auto-generated resource names.
Expand Down Expand Up @@ -478,14 +478,14 @@ def __init__(self,
path: pulumi.Input[str],
namespace: Optional[pulumi.Input[str]] = None,
values: Optional[pulumi.Inputs] = None,
transformations: Optional[pulumi.Inputs] = None,
transformations: Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] = None,
resource_prefix: Optional[str] = None):
"""
:param pulumi.Input[str] path: The path to the chart directory which contains the
`Chart.yaml` file.
:param Optional[pulumi.Input[str]] namespace: Optional namespace to install chart resources into.
:param Optional[pulumi.Inputs] values: Optional overrides for chart values.
:param Optional[List[Tuple[Callable, Optional[pulumi.ResourceOptions]]]] transformations: Optional list of
:param Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] transformations: Optional list of
transformations to apply to resources that will be created by this chart prior to creation.
Allows customization of the chart behaviour without directly modifying the chart itself.
:param Optional[str] resource_prefix: An optional prefix for the auto-generated resource names.
Expand Down
6 changes: 3 additions & 3 deletions sdk/python/pulumi_kubernetes/kustomize.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# *** WARNING: this file was generated by the Pulumi Kubernetes codegen tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

from typing import Callable, List, Optional, Tuple
from typing import Any, Callable, List, Optional

import pulumi.runtime
import pulumi_kubernetes as k8s
Expand All @@ -21,7 +21,7 @@ def __init__(self,
name: str,
directory: str,
opts: Optional[pulumi.ResourceOptions] = None,
transformations: Optional[List[Tuple[Callable, Optional[pulumi.ResourceOptions]]]] = None,
transformations: Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] = None,
resource_prefix: Optional[str] = None):
"""
Directory is a component representing a collection of resources described by a kustomize directory
Expand Down Expand Up @@ -89,7 +89,7 @@ def omit_resource(obj, opts):
Example: ./helloWorld
Example: https://github.com/kubernetes-sigs/kustomize/tree/master/examples/helloWorld
:param Optional[pulumi.ResourceOptions] opts: A bag of optional settings that control a resource's behavior.
:param Optional[List[Tuple[Callable, Optional[pulumi.ResourceOptions]]]] transformations: A set of
:param Optional[List[Callable[[Any, pulumi.ResourceOptions], None]]] transformations: A set of
transformations to apply to Kubernetes resource definitions before registering with engine.
:param Optional[str] resource_prefix: An optional prefix for the auto-generated resource names.
Example: A resource created with resource_prefix="foo" would produce a resource named "foo-resourceName".
Expand Down
Loading

0 comments on commit 0225ea3

Please sign in to comment.