Skip to content

Conversation

@romsharon98
Copy link
Contributor

Related: #36484

Set default value for parameters.

cc: @shahar1


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added area:providers provider:amazon AWS/Amazon - related issues labels Jan 4, 2024
Copy link
Member

@hussein-awala hussein-awala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a dict as a default value is not a good practice:

>>> def test(i, d={}):
...     d[i] = "something"
...     print(d)
... 
>>> test(1, d={})
{1: 'something'}
>>> test(2, d={})
{2: 'something'}
>>> test(1)
{1: 'something'}
>>> test(2)
{1: 'something', 2: 'something'}

romsharon98 and others added 2 commits January 5, 2024 00:52
Co-authored-by: Hussein Awala <hussein@awala.fr>
Co-authored-by: Hussein Awala <hussein@awala.fr>
@hussein-awala hussein-awala merged commit a877bde into apache:main Jan 4, 2024
@romsharon98 romsharon98 deleted the fix/data-sync-operator branch January 5, 2024 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants