Skip to content

Instantly share code, notes, and snippets.

@mypy-play
Last active March 12, 2026 16:32
Show Gist options
  • Select an option

  • Save mypy-play/a5f86e32e70cbc84c45a53db5426f78f to your computer and use it in GitHub Desktop.

Select an option

Save mypy-play/a5f86e32e70cbc84c45a53db5426f78f to your computer and use it in GitHub Desktop.
Shared via mypy Playground
import typing
class P(typing.Protocol):
def foo(self, a: int) -> None: ...
class C:
def foo(self, *args: int) -> None: pass
def f(o: P) -> None:
o.foo(a=1)
f(C())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment