turbaszek commented on a change in pull request #10498:
URL: https://github.com/apache/airflow/pull/10498#discussion_r475451732
##########
File path: airflow/www/views.py
##########
@@ -2329,28 +2411,29 @@ def process_form(self, form, is_created):
form.extra.data = json.dumps(extra)
def prefill_form(self, form, pk):
+ """Prefill the form."""
try:
- d = json.loads(form.data.get('extra', '{}'))
+ extra_dictionary = json.loads(form.data.get('extra', '{}'))
except JSONDecodeError:
- d = {}
+ extra_dictionary = {}
- if not hasattr(d, 'get'):
- logging.warning('extra field for {} is not iterable'.format(
- form.data.get('conn_id', '<unknown>')))
+ if not hasattr(extra_dictionary, 'get'):
Review comment:
> There might be some cases where this object is different than a dict,
so i prefer to leave it as is
Any examples? I personally think that we should make pylint changes by fxing
code not by adding disables. At least I think that was an assumption made some
time ago. I am afraid that if we add disables everywhere then no one ever will
fix the code.
----------------------------------------------------------------
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]