Skip to content

[dateparser] Fix return type of search_dates#15539

Merged
brianschubert merged 1 commit intopython:mainfrom
MajorTanya:fix-dateparser-search-dates-return-types
Mar 22, 2026
Merged

[dateparser] Fix return type of search_dates#15539
brianschubert merged 1 commit intopython:mainfrom
MajorTanya:fix-dateparser-search-dates-return-types

Conversation

@MajorTanya
Copy link
Contributor

dateparser.search.search_dates will return None if no parseable date could be found in the text argument.

This is explained in the original docstring as well.

Closes #15538.

I'm unsure if I have to edit a changelog for this or something in that regard.

dateparser.search.search_dates will return None if no parseable date
could be found in the `text` argument.

This is explained in the original docstring as well.

Closes #15538.
@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@brianschubert
Copy link
Collaborator

I'm unsure if I have to edit a changelog for this or something in that regard.

No need, we auto-generate changelogs for the stub packages from the commit messages: https://github.com/typeshed-internal/stub_uploader/blob/main/data/changelogs/dateparser.md

@brianschubert brianschubert changed the title Fix dateparser search_dates: also returns None [dateparser] Fix return type of search_dates Mar 22, 2026
Copy link
Collaborator

@brianschubert brianschubert left a comment

Choose a reason for hiding this comment

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

Thanks!

@brianschubert brianschubert merged commit 69d322e into python:main Mar 22, 2026
39 checks passed
@MajorTanya MajorTanya deleted the fix-dateparser-search-dates-return-types branch March 22, 2026 17:11
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.

[dateparser] search_dates returns None if nothing is found, stubs only say list

2 participants