Skip to content

Keep later fuzzy times in skipped tokens#1483

Open
ShipItAndPray wants to merge 1 commit into
dateutil:masterfrom
ShipItAndPray:fix-1063-skip-unused-fuzzy-numerics
Open

Keep later fuzzy times in skipped tokens#1483
ShipItAndPray wants to merge 1 commit into
dateutil:masterfrom
ShipItAndPray:fix-1063-skip-unused-fuzzy-numerics

Conversation

@ShipItAndPray
Copy link
Copy Markdown

Summary

  • avoid overwriting an already-parsed fuzzy time when a later HH:MM fragment is encountered
  • return that later time fragment as skipped fuzzy text instead
  • add a regression test around from 13:45 to 17:15 and keep the existing fuzzy error checks green

Partially addresses #1063.

Validation

  • reproduced parse("from 13:45 to 17:15", fuzzy_with_tokens=True) returning the later time before the change
  • PYTHONPATH=src python3 -m pytest tests/test_parser.py -k Fuzzy -o markers="no_cover: no cover"
  • PYTHONPATH=src python3 -m pytest tests/test_parser.py -k CorrectErrorOnFuzzyWithTokens -o markers="no_cover: no cover"

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