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

Fix parsing invalid intervals #843

Merged
merged 2 commits into from
Dec 4, 2024
Merged

Conversation

wiget
Copy link
Contributor

@wiget wiget commented Sep 11, 2024

Parsing a string with a slash at the start or the end raised IndexError instead of ParseError.

Pull Request Check List

  • Added tests for changed code.
  • Updated documentation for changed code.

@wiget
Copy link
Contributor Author

wiget commented Sep 17, 2024

@sdispater would you mind reviewing this PR?

Copy link

codspeed-hq bot commented Sep 22, 2024

CodSpeed Performance Report

Merging #843 will not alter performance

Comparing wiget:single-slash (ae719c6) with master (b84b976)

Summary

✅ 1 untouched benchmarks

@bswck
Copy link

bswck commented Sep 22, 2024

If I could suggest something, it would be just using [:1] instead of [0:1], as the former simply works and is less unnecessarily explicit.

Similarly to how you would probably prefer reading range(10) than range(0, 10).

@wiget
Copy link
Contributor Author

wiget commented Sep 23, 2024

@bswck You are right. Suggestion applied.

@wiget wiget requested review from bswck and Secrus September 23, 2024 12:36
@wiget
Copy link
Contributor Author

wiget commented Oct 24, 2024

@Secrus would you mind reviewing this PR?

@wiget
Copy link
Contributor Author

wiget commented Nov 21, 2024

Thanks for the review.

What is required to get this PR merged?

@Secrus
Copy link
Collaborator

Secrus commented Nov 21, 2024

@wiget please rebase your branch with master so the pipelines run. Right now it looks like GH has some issues here.

Parsing string with slash at the start or the end raised IndexError
instead of ParseError.
@wiget
Copy link
Contributor Author

wiget commented Dec 3, 2024

All checks passed. Would you mind merging this PR, @Secrus ?

@Secrus Secrus merged commit 6205754 into python-pendulum:master Dec 4, 2024
18 checks passed
@bennetrr
Copy link

bennetrr commented Dec 5, 2024

Is there a release planned for this?

@wiget wiget deleted the single-slash branch December 5, 2024 21:58
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.

4 participants