bito-code-review[bot] commented on code in PR #37098:
URL: https://github.com/apache/superset/pull/37098#discussion_r2690197895


##########
tests/unit_tests/utils/date_parser_tests.py:
##########
@@ -613,6 +613,70 @@ def test_date_range_migration() -> None:
     assert not re.search(DateRangeMigration.x_dateunit, field)
 
 
+@patch("superset.utils.date_parser.parse_human_datetime", 
mock_parse_human_datetime)
+def test_first_of_with_explicit_scope() -> None:
+    """Test 'first of [scope] [unit]' expressions that return a single date."""
+    result = get_since_until("first of this month : ")
+    assert result == (datetime(2016, 11, 1), None)

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Missing tzinfo argument in datetime call</b></div>
   <div id="fix">
   
   Line 620 creates a `datetime` object without `tzinfo` argument. Add timezone 
information using `datetime(..., tzinfo=timezone.utc)` or the project's 
preferred timezone handling approach.
   </div>
   
   
   <details>
   <summary>
   <b>Code suggestion</b>
   </summary>
   <blockquote>Check the AI-generated fix before applying</blockquote>
   <div id="code">
   
   
   ````suggestion
       result = get_since_until("first of this month : ")
       from datetime import timezone
       assert result == (datetime(2016, 11, 1, tzinfo=timezone.utc), None)
   ````
   
   </div>
   </details>
   
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #38d2ff</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



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