Skip to content

[tqdm] Add thread_map and process_map type hints#15460

Merged
srittau merged 2 commits intopython:mainfrom
hoel-bagard:tqdm/process_map
Mar 2, 2026
Merged

[tqdm] Add thread_map and process_map type hints#15460
srittau merged 2 commits intopython:mainfrom
hoel-bagard:tqdm/process_map

Conversation

@hoel-bagard
Copy link
Contributor

For the overloads, I've taken that approach from map.

@hoel-bagard hoel-bagard changed the title tqdm: add thread_map and process_map type hints [tqdm] add thread_map and process_map type hints Feb 24, 2026
@hoel-bagard hoel-bagard changed the title [tqdm] add thread_map and process_map type hints [tqdm] Add thread_map and process_map type hints Feb 24, 2026
@github-actions

This comment has been minimized.

@hoel-bagard hoel-bagard marked this pull request as ready for review February 24, 2026 09:52
Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Thanks, this looks very useful! One note.

_T4 = TypeVar("_T4")
_T5 = TypeVar("_T5")

class _TqdmKwargs(TypedDict, total=False):
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs the @type_check_only decorator from typing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I've added in 41d93b2.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

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

@srittau srittau merged commit 1965b20 into python:main Mar 2, 2026
39 checks passed
@hoel-bagard-hy hoel-bagard-hy deleted the tqdm/process_map branch March 3, 2026 00:07
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