Skip to content

docs: add microsecond to supported frame values in span/interval/range/span_range; fix interval example typo#1252

Open
Aiudadadadf wants to merge 2 commits intoarrow-py:masterfrom
Aiudadadadf:doc/span-interval-microsecond-frame
Open

docs: add microsecond to supported frame values in span/interval/range/span_range; fix interval example typo#1252
Aiudadadadf wants to merge 2 commits intoarrow-py:masterfrom
Aiudadadadf:doc/span-interval-microsecond-frame

Conversation

@Aiudadadadf
Copy link

Found a few small documentation inconsistencies while reading through the docstrings.

The microsecond frame is fully supported by _get_frames() - it's right there in _T_FRAMES and in the error message the method raises when you pass something invalid. But four docstrings list the supported frames as "year, quarter, month, week, day, hour, minute, second" without microsecond. You can verify it works: arrow.utcnow().span('microsecond') returns a valid tuple, no complaints. The typed overloads of range() and span_range() already had it listed correctly, which made the inconsistency extra confusing - it's the untyped versions and span()/interval() that were wrong.

Also caught a typo in the interval() usage example: the last line of output had +00:0]> instead of +00:00]> - one zero snuck off somewhere.

Fixes:

  • span(): added microsecond to "Supported frame values"
  • interval(): added microsecond + the missing trailing period
  • untyped range() and span_range() overloads: same fix for consistency
  • interval() example output: +00:0]> ? +00:00]>

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