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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found a few small documentation inconsistencies while reading through the docstrings.
The
microsecondframe is fully supported by_get_frames()- it's right there in_T_FRAMESand 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"withoutmicrosecond. You can verify it works:arrow.utcnow().span('microsecond')returns a valid tuple, no complaints. The typed overloads ofrange()andspan_range()already had it listed correctly, which made the inconsistency extra confusing - it's the untyped versions andspan()/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(): addedmicrosecondto "Supported frame values"interval(): addedmicrosecond+ the missing trailing periodrange()andspan_range()overloads: same fix for consistencyinterval()example output:+00:0]>?+00:00]>