Skip to content

Wrong type annotation for find_node_by_weight #1322

@BarakKatzir

Description

@BarakKatzir

Information

  • rustworkx version: 0.15.1
  • Python version: 3.12

What is the current behavior?

Wrong annotation in rustworkx/rustworkx/rustworkx.pyi

def find_node_by_weight(
        self,
        obj: Callable[[_S], bool],
        /,
    ) -> int | None: ...

What is the expected behavior?

Correct to

def find_node_by_weight(self, obj: _S, /) -> int | None: ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions