Skip to content

Vec2d: type hints for add/sub reject Vec2d despite docstrings #304

Description

@flexihtala
from pymunk import Vec2d

a = Vec2d(0, 0)
b = Vec2d(0, 1)

c = a + b

Expected type 'tuple[float, float]', got 'Vec2d' instead

vec2d.py

...
"""Add a Vec2d with another Vec2d or tuple of size 2.
...
def __add__(self, other: tuple[float, float]) -> "Vec2d":
...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions