diff --git a/include/typings/box2d.pyi b/include/typings/box2d.pyi index efedf9bd..f4395374 100644 --- a/include/typings/box2d.pyi +++ b/include/typings/box2d.pyi @@ -1,13 +1,13 @@ from linalg import vec2, vec4 -from typing import Iterable +from typing import Iterable, Protocol -class _NodeLike: # duck-type protocol +class _NodeLike(Protocol): def on_box2d_contact_begin(self, other: 'Body'): ... def on_box2d_contact_end(self, other: 'Body'): ... def on_box2d_pre_step(self): ... def on_box2d_post_step(self): ... -class _DrawLike: # duck-type protocol +class _DrawLike(Protocol): def draw_polygon(self, vertices: list[vec2], color: vec4): ... def draw_solid_polygon(self, vertices: list[vec2], color: vec4): ... def draw_circle(self, center: vec2, radius: float, color: vec4): ...