Goodkat commented on a change in pull request #15510:
URL: https://github.com/apache/airflow/pull/15510#discussion_r619654732
##########
File path: airflow/providers/odbc/hooks/odbc.py
##########
@@ -171,6 +171,8 @@ def clean_bool(val): # pylint:
disable=inconsistent-return-statements
return True
elif val.lower() == 'false':
return False
+ else:
+ return val
Review comment:
There are different types (at least boolean and string) that could be
returned by this function. Therefore (I suppose) the code analyser complains of
this fact.
However, as I realized, it could be acceptable sometimes in dynamic
languages, so we can conditionally return different data types.
In our case the clean_bool() function's result is used as a value in the
dictionary and dictionaries itself can contain the keys/values of the different
types. Therefore we may ignore this warning and remove the pylint comment from
L168.
Please tell me if it does make sense for you.
--
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]