Skip to content

--pyi_out does not annotate __slots__ #11402

@remko

Description

@remko

What version of protobuf and what language are you using?

Language: Python
protobuf 4.21.12
grpcio 1.51.1, grpcio-tools 1.51.1,
Mypy 0.991

What operating system (Linux, Windows, ...) and version?

macOS Ventura

What runtime / compiler are you using (e.g., python version or gcc version)

Python 3.9.16

What did you do?

Run python3 -m grpc_tools.protoc -pyi_out=...

What did you expect to see

A .pyi that validates Mypy type checks.

What did you see instead?

A .pyi that has the following error:

error: Need type annotation for "__slots__"

It seems __slots__ is the only untyped field in the .pyi.

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