Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Conform to PEP 7 on changed line.
Co-authored-by: Stan Ulbrych <[email protected]>
  • Loading branch information
jhohm and StanFromIreland authored May 19, 2025
commit 15a97fd400d6dac058d8f6fbbc6d256406108c6e
3 changes: 2 additions & 1 deletion Modules/_datetimemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -5539,8 +5539,9 @@ datetime_best_possible(PyObject *cls, TM_FUNC f, PyObject *tzinfo)
time_t secs;
int us;

if (_PyTime_AsTimevalTime_t(ts, &secs, &us, _PyTime_ROUND_HALF_EVEN) < 0)
if (_PyTime_AsTimevalTime_t(ts, &secs, &us, _PyTime_ROUND_HALF_EVEN) < 0) {
return NULL;
}
assert(0 <= us && us <= 999999);

return datetime_from_timet_and_us(cls, f, secs, us, tzinfo);
Expand Down
Loading