ashb commented on a change in pull request #6473: [AIRFLOW-5819] Update
AWSBatchOperator default value
URL: https://github.com/apache/airflow/pull/6473#discussion_r340871679
##########
File path: airflow/contrib/operators/awsbatch_operator.py
##########
@@ -83,7 +83,7 @@ class AWSBatchOperator(BaseOperator):
template_fields = ('job_name', 'overrides',)
@apply_defaults
- def __init__(self, job_name, job_definition, job_queue, overrides,
array_properties=None,
+ def __init__(self, job_name, job_definition, job_queue, overrides,
array_properties={},
Review comment:
You shouldn't do it like this.
https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments
Instead in the method do
```
self.array_properties = array_properties if array_properties is not
None else {}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services