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

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

Copy link
Copy Markdown
ContributorAuthor

@sdispater would you mind reviewing this PR?

@codspeed-hq

codspeed-hqBot 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 threadsrc/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

Copy link
Copy Markdown
ContributorAuthor

@bswck You are right. Suggestion applied.

@wiget

Copy link
Copy Markdown
ContributorAuthor

@Secrus would you mind reviewing this PR?

@wiget

Copy link
Copy Markdown
ContributorAuthor

Thanks for the review.

What is required to get this PR merged?

@Secrus

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
ContributorAuthor

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

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

Copy link
Copy Markdown

Is there a release planned for this?

Sign up for freeto 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

@wiget@johnslavik@Secrus@bennetrr