Skip to content

zmq.select(...) type hints missing list type arguments, could be narrower #2203

Description

@petersuttondev

I wrote this

  • I wrote this Issue and it does not include any output from an AI/LLM tool.

This is a pyzmq bug

  • This is a pyzmq-specific bug, not an issue of zmq socket behavior. Don't worry if you're not sure! We'll figure it out together.

What pyzmq version?

27.1.0

What libzmq version?

4.3.5

Python version (and how it was installed)

3.14.6

OS

Arch Linux

What happened?

rlist: list, wlist: list, xlist: list, timeout: float | None = None

lists are missing type arguments. Signature should be something like:

def select[T](
    rlist: list[Socket[T] | int],
    wlist: list[Socket[T] | int],
    xlist: list[Socket[T] | int],
    timeout: float | None = ...,
) -> tuple[list[Socket[T] | int], list[Socket[T] | int], list[Socket[T] | int]]: ...

Code to reproduce bug

Traceback, if applicable

More info

No response

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions