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

apply str.strip() in sanitize_date #841

Merged
merged 1 commit into from
Nov 23, 2020

Conversation

noviluni
Copy link
Collaborator

The trailing spaces can cause unexpected issues. For example:

>>> dateparser.parse('Mon, 25 Jun 2018 10:37:47 +0530 ')

returns None.

(Or this: #691).

For that reason, I added an str.strip() to the sanitize_date() function.

@codecov
Copy link

codecov bot commented Nov 23, 2020

Codecov Report

Merging #841 (25ed605) into master (939e722) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #841      +/-   ##
==========================================
+ Coverage   98.33%   98.37%   +0.03%     
==========================================
  Files         231      231              
  Lines        2590     2591       +1     
==========================================
+ Hits         2547     2549       +2     
+ Misses         43       42       -1     
Impacted Files Coverage Δ
dateparser/date.py 100.00% <100.00%> (ø)
dateparser/languages/dictionary.py 100.00% <0.00%> (+0.67%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 939e722...25ed605. Read the comment docs.

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.

None yet

2 participants