Skip to content

readable_stubs generates invalid files for GRPC #650

@KapJI

Description

@KapJI

When using --mypy_grpc_out=readable_stubs:. async and sync imports are duplicated and type arguments clash:

from grpc import (
    Channel,
    Server,
    ServicerContext,
    UnaryStreamMultiCallable,
    UnaryUnaryMultiCallable,
)
from grpc.aio import (
    Channel,
    Server,
    ServicerContext,
    UnaryStreamMultiCallable,
    UnaryUnaryMultiCallable,
)

class ServiceStub:
    def __init__(self, channel: Union[Channel, Channel]): -> None: ...

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