Repository navigation
Conversation
FanWu-ai
marked this pull request as ready for review
October 20, 2026 21:38
Merging this PR will not alter performanceℹ️ 1 benchmark has no flamegraph
Comparing |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
An inverted interval iterates backwards, but its membership check always uses
start <= item <= end. As a result, every member ofInterval(Date(2024, 1, 3), Date(2024, 1, 1)), including its endpoints, is reported absent.Choose the inclusive bounds according to endpoint order without changing the stored endpoints or iteration direction. Tests cover normal/inverted and absolute intervals; stdlib dates/aware datetimes and Pendulum inputs; zero-length intervals; and differently-offset datetime endpoints. The docs now explicitly describe inclusive, direction-independent membership.
Verification
Linux x86_64 / CPython 3.12.14, upstream
e06dacedc4cdea90fa1286b3965d180ab94cf251:prek run --all-files: all six hooks passed, including Ruff and Rust formatting/clippy.mkdocs build --strict -f docs/mkdocs.yml: passed; the same six pre-existing informational anchor notices appear on the pristine build.git diff --check: passed.The unchanged skips are one Windows-only test and two existing unsupported zoneinfo POSIX-transition cases. Native-extension loading was verified. Other operating systems and Python versions were not tested locally. Hosted CI is not claimed passed.
Pull Request Check List
Prepared and tested with OpenAI Codex assistance, including automated review. No human review is claimed.