Skip to content

Improve boltons dictutils stubs#15879

Merged
srittau merged 2 commits into
python:mainfrom
costynus:improve-boltons-dictutils
Jun 11, 2026
Merged

Improve boltons dictutils stubs#15879
srittau merged 2 commits into
python:mainfrom
costynus:improve-boltons-dictutils

Conversation

@costynus

@costynus costynus commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Improve OrderedMultiDict return types for counts, fromkeys, getlist, and inverted
  • Refine ManyToMany to match the runtime class more closely
  • Add missing/stricter annotations for ManyToMany methods and inverse mapping

Runtime reference

https://boltons.readthedocs.io/en/latest/_modules/boltons/dictutils.html

Tests

  • uv run python tests/runtests.py stubs/boltons
  • uv run pre-commit run --files stubs/boltons/boltons/dictutils.pyi
  • uv run python tests/runtests.py --run-stubtest stubs/boltons

@github-actions

This comment has been minimized.

@srittau srittau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks mostly good. A few remarks below.

Comment thread stubs/boltons/boltons/dictutils.pyi Outdated
Comment thread stubs/boltons/boltons/dictutils.pyi Outdated
@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 7e1dfd9 into python:main Jun 11, 2026
44 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