potiuk commented on code in PR #33227:
URL: https://github.com/apache/airflow/pull/33227#discussion_r1295587118
##########
airflow/providers/alibaba/cloud/hooks/analyticdb_spark.py:
##########
@@ -321,7 +321,7 @@ def _validate_extra_conf(conf: dict[Any, Any]) -> bool:
if conf:
if not isinstance(conf, dict):
raise ValueError("'conf' argument must be a dict")
- if not all(v and isinstance(v, str) or isinstance(v, int) for v in
conf.values()):
+ if not all((v and isinstance(v, str)) or isinstance(v, int) for v
in conf.values()):
Review Comment:
I believe the original condition was wrong. The intention is to make sure
that all of the values are either string or int which is likely better and
shorter done this way:
```suggestion
if not all(isinstance(v, (str, int)) for v in conf.values()):
```
--
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]