Repository navigation
Validate parser names against the parsers that exist - #1395
Merged
Merged
Conversation
AdrianAtZyte
marked this pull request as ready for review
September 22, 2026 22:20
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1395 +/- ##
==========================================
+ Coverage 98.97% 98.98% +0.01%
==========================================
Files 239 239
Lines 3610 3759 +149
==========================================
+ Hits 3573 3721 +148
- Misses 37 38 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
serhii73
approved these changes
Oct 20, 2026
serhii73
left a comment
Collaborator
There was a problem hiding this comment.
Code review (claude code-review, at 70ff64f). No correctness issue found in the validation itself.
Non-blocking notes:
- The registry stores method names as strings and resolves them with
getattr. A renamed_try_*method would pass_check_parsersand only fail withAttributeErrorwhen a date reaches that parser. A test asserting every registered name resolves to an attribute (and that every name indefault_parsersis registered) would catch that in CI. _check_parsersimportsdateparser.datefrom inside the function, which hides aconf->datecycle. The list of valid names could live next todefault_parsersindateparser_data/settings.pyso both modules import it.default_parsersis still hand-maintained and not tied to the registry.- The error message joins an unordered set;
sorted(unknown_parsers)would make it deterministic.
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.
Fixes #798.