gemini-code-assist[bot] commented on code in PR #38221:
URL: https://github.com/apache/beam/pull/38221#discussion_r3095583078


##########
sdks/python/container/build.gradle:
##########
@@ -57,7 +57,8 @@ for(int i=min_python_version; i<=max_python_version; ++i) {
       }
     }
     dependsOn ':sdks:python:container:py' + cur + ':docker'
-    if (project.hasProperty("include-ml")) {
+    // 3.14 does not have dependencies for ML yet.
+    if (project.hasProperty("include-ml") && cur != '314') {

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   Using a numeric comparison with the loop variable `i` is more robust and 
future-proof than a string comparison with `cur`. In Groovy, comparing an 
integer to a string (e.g., `314 != '314'`) evaluates to `true`, which would 
defeat the purpose of this check if `cur` is an integer. Additionally, using `i 
< 314` automatically handles future Python versions (like 3.15) that may also 
lack ML support initially, preventing unexpected CI failures.
   
   ```
       // 3.14 and newer do not have dependencies for ML yet.
       if (project.hasProperty("include-ml") && i < 314) {
   ```



-- 
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]

Reply via email to