massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / protobuf / google / protobuf / internal / enum_type_wrapper.pyi
1 from typing import Generic, List, Text, Tuple, TypeVar
2
3 from google.protobuf.descriptor import EnumDescriptor
4
5 _V = TypeVar("_V", bound=int)
6
7 # Expose a generic version so that those using mypy-protobuf
8 # can get autogenerated NewType wrapper around the int values
9 class _EnumTypeWrapper(Generic[_V]):
10     DESCRIPTOR: EnumDescriptor
11     def __init__(self, enum_type: EnumDescriptor) -> None: ...
12     def Name(self, number: _V) -> str: ...
13     def Value(self, name: Text | bytes) -> _V: ...
14     def keys(self) -> List[str]: ...
15     def values(self) -> List[_V]: ...
16     def items(self) -> List[Tuple[str, _V]]: ...
17
18 class EnumTypeWrapper(_EnumTypeWrapper[int]): ...