blueloveTH преди 2 години
родител
ревизия
2e8448577d
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      include/typings/box2d.pyi

+ 3 - 3
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): ...