Skip to content

Instantly share code, notes, and snippets.

@mypy-play
Created February 9, 2025 15:31
Shared via mypy Playground
from functools import partial
def func(a: str, b: int) -> None:
print(f"{a=}, {b=}")
partial_func = partial(
func,
# Argument 1 to "func" has incompatible type "**dict[str, int]"; expected "str" [arg-type]
**dict(b=42),
)
# Too many positional arguments for "func" [misc]
partial_func("Hello")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment