Skip to content

[croniter] Correct nth-weekday mapping types - #16853

Merged
srittau merged 1 commit into
python:mainfrom
prathamchoksi:fix/croniter-weekday-key-types
Nov 17, 2026
Merged

srittau merged 1 commit into
python:mainfrom
prathamchoksi:fix/croniter-weekday-key-types

Conversation

@prathamchoksi

Copy link
Copy Markdown
Contributor

Correct the mapping types for croniter.expand() and nth_weekday_of_month to use integer weekday keys and allow the last-occurrence marker "l": the expressions 0 0 * * 2#3 and 0 0 * * L5 return {2: {3}} and {5: {"l"}}, while the current types reject valid integer lookups and miss the string marker.

Upstream: croniter 6.2.4 implementation.

Assisted by OpenAI Codex.

@github-actions

Copy link
Copy Markdown
Contributor

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

@srittau
srittau merged commit 92a2ee3 into python:main Nov 17, 2026
74 checks passed
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.

2 participants