[sdk/python] Improve ResourceOptions.merge
type (#4484)
* [sdk/python] Improve `ResoruceOptions.merge` type The implementation correctly handles `None` inputs, so the type should allow these as well. * Add CHANGELOG
This commit is contained in:
parent
0f424e73ce
commit
cfa57914a1
|
@ -16,10 +16,12 @@ CHANGELOG
|
|||
- Ensure Go accessor methods correctly support nested fields of optional outputs
|
||||
[#4456](https://github.com/pulumi/pulumi/pull/4456)
|
||||
|
||||
- Improve `ResourceOptions.merge` type in Python SDK
|
||||
[#4484](https://github.com/pulumi/pulumi/pull/4484)
|
||||
|
||||
- Ensure generated Python module names are keyword-safe.
|
||||
[#4473](https://github.com/pulumi/pulumi/pull/4473)
|
||||
|
||||
|
||||
## 2.0.0 (2020-04-16)
|
||||
|
||||
- CLI behavior change. Commands in non-interactive mode (i.e. when `pulumi` has its output piped to
|
||||
|
|
|
@ -444,7 +444,7 @@ class ResourceOptions:
|
|||
|
||||
# pylint: disable=method-hidden
|
||||
@staticmethod
|
||||
def merge(opts1: 'ResourceOptions', opts2: 'ResourceOptions') -> 'ResourceOptions':
|
||||
def merge(opts1: Optional['ResourceOptions'], opts2: Optional['ResourceOptions']) -> 'ResourceOptions':
|
||||
"""
|
||||
merge produces a new ResourceOptions object with the respective attributes of the `opts1`
|
||||
instance in it with the attributes of `opts2` merged over them.
|
||||
|
|
Loading…
Reference in a new issue