Skip to content

Accept supported step and stop types in boltons.daterange - #16957

Open
Lushiyao5 wants to merge 1 commit into
python:mainfrom
Lushiyao5:fix-boltons-daterange-types
Open

Lushiyao5 wants to merge 1 commit into
python:mainfrom
Lushiyao5:fix-boltons-daterange-types

Conversation

@Lushiyao5

Copy link
Copy Markdown
Contributor

boltons.timeutils.daterange() documents a timedelta or a three-integer (year, month, day) tuple as alternatives to an integer step. It also supports stop=None for an unbounded iterator. Include those arguments in the stub while preserving the existing defaults and yielded date type.

I verified bounded integer, timedelta, and monthly tuple steps, plus a bounded sample of the unbounded iterator. Mypy reports three argument errors with the current stub and passes on the examples and updated stub after the patch.

This patch was prepared with assistance from OpenAI Codex.

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

This branch has not been deployed

No deployments
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.

1 participant