Skip to content

Fix parsing invalid intervals#843

Merged
Secrus merged 2 commits into
python-pendulum:masterfrom
wiget:single-slash
Dec 4, 2024
Merged

Fix parsing invalid intervals#843
Secrus merged 2 commits into
python-pendulum:masterfrom
wiget:single-slash

Conversation

@wiget

@wiget wiget commented Sep 11, 2024

Copy link
Copy Markdown
Contributor

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

wiget commented Sep 17, 2024

Copy link
Copy Markdown
Contributor Author

@sdispater would you mind reviewing this PR?

@codspeed-hq

codspeed-hq Bot commented Sep 22, 2024

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #843 will not alter performance

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

Summary

✅ 1 untouched benchmarks

Comment thread src/pendulum/parsing/__init__.py Outdated
@johnslavik

Copy link
Copy Markdown

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

wiget commented Sep 23, 2024

Copy link
Copy Markdown
Contributor Author

@bswck You are right. Suggestion applied.

@wiget wiget requested review from Secrus and johnslavik September 23, 2024 12:36
@wiget

wiget commented Oct 24, 2024

Copy link
Copy Markdown
Contributor Author

@Secrus would you mind reviewing this PR?

@wiget

wiget commented Nov 21, 2024

Copy link
Copy Markdown
Contributor Author

Thanks for the review.

What is required to get this PR merged?

@Secrus

Secrus commented Nov 21, 2024

Copy link
Copy Markdown
Collaborator

@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

wiget commented Dec 3, 2024

Copy link
Copy Markdown
Contributor Author

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

@Secrus Secrus merged commit 6205754 into python-pendulum:master Dec 4, 2024
@bennetrr

bennetrr commented Dec 5, 2024

Copy link
Copy Markdown

Is there a release planned for this?

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