Skip to content

Instantly share code, notes, and snippets.

@mypy-play
Created February 9, 2025 15:31

Revisions

  1. mypy-play created this gist Feb 9, 2025.
    14 changes: 14 additions & 0 deletions main.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    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")