Skip to content

is_timestamp: reject non-finite floats so 'inf' and 'nan' no longer look like timestamps - #1321

Open
HrachShah wants to merge 1 commit into
arrow-py:masterfrom
HrachShah:fix/is-timestamp-reject-inf-nan
Open

is_timestamp: reject non-finite floats so 'inf' and 'nan' no longer look like timestamps#1321
HrachShah wants to merge 1 commit into
arrow-py:masterfrom
HrachShah:fix/is-timestamp-reject-inf-nan

Conversation

@HrachShah

Copy link
Copy Markdown

Returns False for inf, -inf, and nan (including their string forms) instead of silently letting them through to a confusing ValueError downstream. Uses math.isfinite to keep the original int/float/str contract. Tests added; full suite (1905 passed) clean.

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2224255) to head (cfcf001).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #1321   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines         2315      2316    +1     
  Branches       358       358           
=========================================
+ Hits          2315      2316    +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant