Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update story_list() to handle indexed_date values with or without microseconds #89

Merged
merged 3 commits into from
Feb 15, 2024

Conversation

NullPxl
Copy link
Contributor

@NullPxl NullPxl commented Feb 14, 2024

In reference to #88, this PR sets up a try/except block to include the maximum available resolution of a given timestamp in indexed_date rather than truncating data that comes after the seconds.

@NullPxl NullPxl requested a review from rahulbot February 14, 2024 21:13
@NullPxl NullPxl marked this pull request as draft February 14, 2024 21:18
@NullPxl NullPxl marked this pull request as ready for review February 14, 2024 21:20
Copy link
Contributor

@rahulbot rahulbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Very pythonic.

@philbudne
Copy link
Contributor

philbudne commented Feb 14, 2024 via email

@NullPxl
Copy link
Contributor Author

NullPxl commented Feb 15, 2024

Oh wow nice catch @philbudne ! I didn't realize fromisoformat() did that. Do you think there's any chance of ever receiving something other than 0 or 6 digits of a fractional second? If so I'll stick with the try/except but otherwise fromisoformat() is cleaner.

@philbudne
Copy link
Contributor

philbudne commented Feb 15, 2024 via email

@NullPxl
Copy link
Contributor Author

NullPxl commented Feb 15, 2024

sounds good I like the suggestion, added it to the most recent commit

@NullPxl NullPxl marked this pull request as draft February 15, 2024 17:40
@NullPxl NullPxl marked this pull request as ready for review February 15, 2024 17:40
@NullPxl NullPxl requested a review from rahulbot February 15, 2024 17:40
Copy link
Contributor

@rahulbot rahulbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great knowledge sharing. I like simple solutions 👍🏽

@NullPxl NullPxl merged commit 9cc7d78 into main Feb 15, 2024
0 of 2 checks passed
@NullPxl NullPxl deleted the indexed_date_edits branch February 15, 2024 19:13
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.

3 participants