gemini-code-assist[bot] commented on code in PR #18745:
URL: https://github.com/apache/tvm/pull/18745#discussion_r2785035861


##########
tests/python/tir-base/test_tir_structural_equal_hash.py:
##########
@@ -40,14 +40,14 @@ def consistent_equal(x, y, map_free_vars=False):
     # we can confirm that hash colison doesn't happen for our testcases
     if struct_equal0 != (xhash == yhash):
         raise ValueError(
-            "Inconsistent {} vs {}, sequal={}, xhash={}, yhash={}".format(
+            "Inconsistent {} vs {}, struct_equal={}, xhash={}, 
yhash={}".format(
                 x, y, struct_equal0, xhash, yhash
             )

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   Similar to the previous suggestion, using an f-string here would make the 
error message more readable and is consistent with modern Python style.
   
   ```python
               f"Inconsistent {x} vs {y}, struct_equal={struct_equal0}, 
xhash={xhash}, yhash={yhash}"
   ```



##########
tests/python/tir-base/test_tir_structural_equal_hash.py:
##########
@@ -31,7 +31,7 @@ def consistent_equal(x, y, map_free_vars=False):
 
     if struct_equal0 != struct_equal1:
         raise ValueError(
-            "Non-commutative {} vs {}, sequal0={}, sequal1={}".format(
+            "Non-commutative {} vs {}, struct_equal0={}, 
struct_equal1={}".format(
                 x, y, struct_equal0, struct_equal1
             )

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   For improved readability and conciseness, consider using an f-string for 
this error message. F-strings are generally preferred over `.format()` in 
modern Python.
   
   ```python
               f"Non-commutative {x} vs {y}, struct_equal0={struct_equal0}, 
struct_equal1={struct_equal1}"
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to