Skip to content

Instantly share code, notes, and snippets.

@mypy-play
Created March 12, 2026 16:31
Show Gist options
  • Select an option

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

Select an option

Save mypy-play/c2b64392c1877fce9b93f56d8349e1ae 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