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

Use TimestampParser in Gen5 PlateNumber #258

Merged
merged 22 commits into from
Feb 2, 2024

Conversation

bdworth
Copy link
Contributor

@bdworth bdworth commented Jan 29, 2024

Remove redundant and buggy date parsing. This gets passed up to use VendorParser._get_date_time already.

Note that DTZ007 is not a great warning to suppress:
https://docs.astral.sh/ruff/rules/call-datetime-strptime-without-zone/

Tested via a new integration test that [simply removes a " PM" from a time and] fails without the source changes.

Added a TODO noting that TimestampParser doesn't handle localization. Falling back to use it means that it's possible a date/time string that would error before because it didn't match the current mm/dd hardcoded format will not error now whereas it would have before. -- e.g., "01/02/2024" will parse as "2024-01-02" even if it came from a locale using dd/mm formatting. Improving TimestampParser is out of scope now though.

@bdworth bdworth marked this pull request as ready for review January 29, 2024 17:59
@bdworth bdworth requested a review from a team as a code owner January 29, 2024 17:59
Base automatically changed from gen5-plate-number to main January 31, 2024 16:25
@nathan-stender nathan-stender merged commit 73ce9ed into main Feb 2, 2024
3 checks passed
@nathan-stender nathan-stender deleted the gen5-plate-number-timestamp-parser branch February 2, 2024 22:22
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.

2 participants