bhirsz commented on code in PR #26761:
URL: https://github.com/apache/airflow/pull/26761#discussion_r982840431
##########
airflow/providers/common/sql/operators/sql.py:
##########
@@ -33,7 +33,21 @@
from airflow.utils.context import Context
-def parse_boolean(val: str) -> str | bool:
+def _convert_to_float_if_possible(s):
+ """
+ A small helper function to convert a string to a numeric value
+ if appropriate
+
+ :param s: the string to be converted
+ """
+ try:
+ ret = float(s)
Review Comment:
Unnecessary variable, you can return directly (return float(s) or return s
in except)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]