Disable Python Argument Lifting #4721
Labels
effort/medium
Medium work item – a couple days of effort
feature-request
A feature should be added or improved.
p2
Describe the feature
An option to disable Python argument lifting for the whole project or specific functions and constructors.
Use Case
I need help turning "argument lifting in Python" off. By chance, I found some mention of this in the docs as I did not even know how to ask this question. https://aws.github.io/jsii/user-guides/language-support
It will automatically "deconstruct" the properties of the last argument if that argument is an interface.
The docs say it applies to constructors but it applies to any function it seems.
Let's take this example. I have two functions
For diffAll the last (and only) argument is an interface. So JSII decides to deconstruct/argument lift (help me with the correct word here?, not a Python dev) and when calling it wants you to pass in each of the properties.
For diffSelect the last argument is not an interface, so it leaves the first argument that is an interface alone and does not expand it.
How can I stop this argument lifting? I peeked at the source (the
getliftedProp
function is defined here) and it does not seem an option like this exists?Proposed Solution
No response
Other Information
No response
Acknowledgements
CDK version used
Environment details (OS name and version, etc.)
The text was updated successfully, but these errors were encountered: