Skip to content

Fix **kwargs typehints#2884

Merged
billti merged 1 commit intomainfrom
oscarpuente/fix-kwargs-typehint
Jan 31, 2026
Merged

Fix **kwargs typehints#2884
billti merged 1 commit intomainfrom
oscarpuente/fix-kwargs-typehint

Conversation

@orpuente-MS
Copy link
Contributor

@orpuente-MS orpuente-MS commented Jan 23, 2026

We have **kwargs: Optional[Dict[str, Any]] in a few places in our codebase. This is actually means "each kwarg is of type Optional[Dict[str, Any]]. The right thing to do is **kwargs: Any.

Once our minimum supported Python version is 3.11, we will be able to have more precise type hints for **kwargs.

https://typing.python.org/en/latest/spec/callables.html#unpack-kwargs

Before the change (with Pylance typeChecking set to "standard"):
image

After the change (with Pylance typeChecking set to "standard"):
image

@billti billti added this pull request to the merge queue Jan 31, 2026
Merged via the queue into main with commit d86bc2c Jan 31, 2026
18 checks passed
@billti billti deleted the oscarpuente/fix-kwargs-typehint branch January 31, 2026 20:16
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