From 2f712a410d131fedb8c9947a01a34d3c3e992235 Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Fri, 12 Jan 2018 17:26:04 -0800 Subject: [PATCH] Remove incomplete thrift stubs that cause false positives. --- third_party/2and3/thrift/Thrift.pyi | 51 --------- third_party/2and3/thrift/__init__.pyi | 0 .../2and3/thrift/protocol/TBinaryProtocol.pyi | 62 ---------- .../2and3/thrift/protocol/TProtocol.pyi | 76 ------------- .../2and3/thrift/protocol/__init__.pyi | 7 -- .../2and3/thrift/transport/TSocket.pyi | 29 ----- .../2and3/thrift/transport/TTransport.pyi | 107 ------------------ .../2and3/thrift/transport/__init__.pyi | 5 - 8 files changed, 337 deletions(-) delete mode 100644 third_party/2and3/thrift/Thrift.pyi delete mode 100644 third_party/2and3/thrift/__init__.pyi delete mode 100644 third_party/2and3/thrift/protocol/TBinaryProtocol.pyi delete mode 100644 third_party/2and3/thrift/protocol/TProtocol.pyi delete mode 100644 third_party/2and3/thrift/protocol/__init__.pyi delete mode 100644 third_party/2and3/thrift/transport/TSocket.pyi delete mode 100644 third_party/2and3/thrift/transport/TTransport.pyi delete mode 100644 third_party/2and3/thrift/transport/__init__.pyi diff --git a/third_party/2and3/thrift/Thrift.pyi b/third_party/2and3/thrift/Thrift.pyi deleted file mode 100644 index 7d5a28fa4f9e..000000000000 --- a/third_party/2and3/thrift/Thrift.pyi +++ /dev/null @@ -1,51 +0,0 @@ -from typing import Any - -class TType: - STOP = ... # type: Any - VOID = ... # type: Any - BOOL = ... # type: Any - BYTE = ... # type: Any - I08 = ... # type: Any - DOUBLE = ... # type: Any - I16 = ... # type: Any - I32 = ... # type: Any - I64 = ... # type: Any - STRING = ... # type: Any - UTF7 = ... # type: Any - STRUCT = ... # type: Any - MAP = ... # type: Any - SET = ... # type: Any - LIST = ... # type: Any - UTF8 = ... # type: Any - UTF16 = ... # type: Any - -class TMessageType: - CALL = ... # type: Any - REPLY = ... # type: Any - EXCEPTION = ... # type: Any - ONEWAY = ... # type: Any - -class TProcessor: - def process(iprot, oprot): ... - -class TException(Exception): - message = ... # type: Any - def __init__(self, message=...) -> None: ... - -class TApplicationException(TException): - UNKNOWN = ... # type: Any - UNKNOWN_METHOD = ... # type: Any - INVALID_MESSAGE_TYPE = ... # type: Any - WRONG_METHOD_NAME = ... # type: Any - BAD_SEQUENCE_ID = ... # type: Any - MISSING_RESULT = ... # type: Any - INTERNAL_ERROR = ... # type: Any - PROTOCOL_ERROR = ... # type: Any - INVALID_TRANSFORM = ... # type: Any - INVALID_PROTOCOL = ... # type: Any - UNSUPPORTED_CLIENT_TYPE = ... # type: Any - type = ... # type: Any - def __init__(self, type=..., message=...) -> None: ... - message = ... # type: Any - def read(self, iprot): ... - def write(self, oprot): ... diff --git a/third_party/2and3/thrift/__init__.pyi b/third_party/2and3/thrift/__init__.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/third_party/2and3/thrift/protocol/TBinaryProtocol.pyi b/third_party/2and3/thrift/protocol/TBinaryProtocol.pyi deleted file mode 100644 index 21a729daeaaa..000000000000 --- a/third_party/2and3/thrift/protocol/TBinaryProtocol.pyi +++ /dev/null @@ -1,62 +0,0 @@ -from typing import Any - -from .TProtocol import TProtocolBase -from .TProtocol import * # noqa: F403 - -class TBinaryProtocol(TProtocolBase): - VERSION_MASK = ... # type: Any - VERSION_1 = ... # type: Any - TYPE_MASK = ... # type: Any - strictRead = ... # type: Any - strictWrite = ... # type: Any - def __init__(self, trans, strictRead=..., strictWrite=...) -> None: ... - def writeMessageBegin(self, name, type, seqid): ... - def writeMessageEnd(self): ... - def writeStructBegin(self, name): ... - def writeStructEnd(self): ... - def writeFieldBegin(self, name, type, id): ... - def writeFieldEnd(self): ... - def writeFieldStop(self): ... - def writeMapBegin(self, ktype, vtype, size): ... - def writeMapEnd(self): ... - def writeListBegin(self, etype, size): ... - def writeListEnd(self): ... - def writeSetBegin(self, etype, size): ... - def writeSetEnd(self): ... - def writeBool(self, bool): ... - def writeByte(self, byte): ... - def writeI16(self, i16): ... - def writeI32(self, i32): ... - def writeI64(self, i64): ... - def writeDouble(self, dub): ... - def writeString(self, str): ... - def readMessageBegin(self): ... - def readMessageEnd(self): ... - def readStructBegin(self): ... - def readStructEnd(self): ... - def readFieldBegin(self): ... - def readFieldEnd(self): ... - def readMapBegin(self): ... - def readMapEnd(self): ... - def readListBegin(self): ... - def readListEnd(self): ... - def readSetBegin(self): ... - def readSetEnd(self): ... - def readBool(self): ... - def readByte(self): ... - def readI16(self): ... - def readI32(self): ... - def readI64(self): ... - def readDouble(self): ... - def readString(self): ... - -class TBinaryProtocolFactory: - strictRead = ... # type: Any - strictWrite = ... # type: Any - def __init__(self, strictRead=..., strictWrite=...) -> None: ... - def getProtocol(self, trans): ... - -class TBinaryProtocolAccelerated(TBinaryProtocol): ... - -class TBinaryProtocolAcceleratedFactory: - def getProtocol(self, trans): ... diff --git a/third_party/2and3/thrift/protocol/TProtocol.pyi b/third_party/2and3/thrift/protocol/TProtocol.pyi deleted file mode 100644 index cf5d3565ebce..000000000000 --- a/third_party/2and3/thrift/protocol/TProtocol.pyi +++ /dev/null @@ -1,76 +0,0 @@ -from typing import Any - -from thrift.Thrift import TException -from thrift.Thrift import * # noqa: F403 - -class TProtocolException(TException): - UNKNOWN = ... # type: Any - INVALID_DATA = ... # type: Any - NEGATIVE_SIZE = ... # type: Any - SIZE_LIMIT = ... # type: Any - BAD_VERSION = ... # type: Any - NOT_IMPLEMENTED = ... # type: Any - DEPTH_LIMIT = ... # type: Any - type = ... # type: Any - def __init__(self, type=..., message=...) -> None: ... - -class TProtocolBase: - trans = ... # type: Any - def __init__(self, trans) -> None: ... - def writeMessageBegin(self, name, ttype, seqid): ... - def writeMessageEnd(self): ... - def writeStructBegin(self, name): ... - def writeStructEnd(self): ... - def writeFieldBegin(self, name, ttype, fid): ... - def writeFieldEnd(self): ... - def writeFieldStop(self): ... - def writeMapBegin(self, ktype, vtype, size): ... - def writeMapEnd(self): ... - def writeListBegin(self, etype, size): ... - def writeListEnd(self): ... - def writeSetBegin(self, etype, size): ... - def writeSetEnd(self): ... - def writeBool(self, bool_val): ... - def writeByte(self, byte): ... - def writeI16(self, i16): ... - def writeI32(self, i32): ... - def writeI64(self, i64): ... - def writeDouble(self, dub): ... - def writeString(self, str_val): ... - def readMessageBegin(self): ... - def readMessageEnd(self): ... - def readStructBegin(self): ... - def readStructEnd(self): ... - def readFieldBegin(self): ... - def readFieldEnd(self): ... - def readMapBegin(self): ... - def readMapEnd(self): ... - def readListBegin(self): ... - def readListEnd(self): ... - def readSetBegin(self): ... - def readSetEnd(self): ... - def readBool(self): ... - def readByte(self): ... - def readI16(self): ... - def readI32(self): ... - def readI64(self): ... - def readDouble(self): ... - def readString(self): ... - def skip(self, ttype): ... - def readFieldByTType(self, ttype, spec): ... - def readContainerList(self, spec): ... - def readContainerSet(self, spec): ... - def readContainerStruct(self, spec): ... - def readContainerMap(self, spec): ... - def readStruct(self, obj, thrift_spec): ... - def writeContainerStruct(self, val, spec): ... - def writeContainerList(self, val, spec): ... - def writeContainerSet(self, val, spec): ... - def writeContainerMap(self, val, spec): ... - def writeStruct(self, obj, thrift_spec): ... - def writeFieldByTType(self, ttype, val, spec): ... - -def checkIntegerLimits(i, bits): ... - -class TProtocolFactory: - def getProtocol(self, trans): ... diff --git a/third_party/2and3/thrift/protocol/__init__.pyi b/third_party/2and3/thrift/protocol/__init__.pyi deleted file mode 100644 index 4a5b650bed70..000000000000 --- a/third_party/2and3/thrift/protocol/__init__.pyi +++ /dev/null @@ -1,7 +0,0 @@ -# Names in __all__ with no definition: -# TBase -# TBinaryProtocol -# TCompactProtocol -# TJSONProtocol -# TProtocol -# fastbinary diff --git a/third_party/2and3/thrift/transport/TSocket.pyi b/third_party/2and3/thrift/transport/TSocket.pyi deleted file mode 100644 index 9e0fef47c599..000000000000 --- a/third_party/2and3/thrift/transport/TSocket.pyi +++ /dev/null @@ -1,29 +0,0 @@ -from typing import Any - -from .TTransport import TTransportBase, TServerTransportBase -from .TTransport import * # noqa: F403 - -class TSocketBase(TTransportBase): - handle = ... # type: Any - def close(self): ... - -class TSocket(TSocketBase): - host = ... # type: Any - port = ... # type: Any - handle = ... # type: Any - def __init__(self, host=..., port=..., unix_socket=..., socket_family=...) -> None: ... - def setHandle(self, h): ... - def isOpen(self): ... - def setTimeout(self, ms): ... - def open(self): ... - def read(self, sz): ... - def write(self, buff): ... - def flush(self): ... - -class TServerSocket(TSocketBase, TServerTransportBase): - host = ... # type: Any - port = ... # type: Any - handle = ... # type: Any - def __init__(self, host=..., port=..., unix_socket=..., socket_family=...) -> None: ... - def listen(self): ... - def accept(self): ... diff --git a/third_party/2and3/thrift/transport/TTransport.pyi b/third_party/2and3/thrift/transport/TTransport.pyi deleted file mode 100644 index 18d2eab0f77f..000000000000 --- a/third_party/2and3/thrift/transport/TTransport.pyi +++ /dev/null @@ -1,107 +0,0 @@ -from typing import Any -from thrift.Thrift import TException - -class TTransportException(TException): - UNKNOWN = ... # type: Any - NOT_OPEN = ... # type: Any - ALREADY_OPEN = ... # type: Any - TIMED_OUT = ... # type: Any - END_OF_FILE = ... # type: Any - type = ... # type: Any - def __init__(self, type=..., message=...) -> None: ... - -class TTransportBase: - def isOpen(self): ... - def open(self): ... - def close(self): ... - def read(self, sz): ... - def readAll(self, sz): ... - def write(self, buf): ... - def flush(self): ... - -class CReadableTransport: - @property - def cstringio_buf(self): ... - def cstringio_refill(self, partialread, reqlen): ... - -class TServerTransportBase: - def listen(self): ... - def accept(self): ... - def close(self): ... - -class TTransportFactoryBase: - def getTransport(self, trans): ... - -class TBufferedTransportFactory: - def getTransport(self, trans): ... - -class TBufferedTransport(TTransportBase, CReadableTransport): - DEFAULT_BUFFER = ... # type: Any - def __init__(self, trans, rbuf_size=...) -> None: ... - def isOpen(self): ... - def open(self): ... - def close(self): ... - def read(self, sz): ... - def write(self, buf): ... - def flush(self): ... - @property - def cstringio_buf(self): ... - def cstringio_refill(self, partialread, reqlen): ... - -class TMemoryBuffer(TTransportBase, CReadableTransport): - def __init__(self, value=...) -> None: ... - def isOpen(self): ... - def open(self): ... - def close(self): ... - def read(self, sz): ... - def write(self, buf): ... - def flush(self): ... - def getvalue(self): ... - @property - def cstringio_buf(self): ... - def cstringio_refill(self, partialread, reqlen): ... - -class TFramedTransportFactory: - def getTransport(self, trans): ... - -class TFramedTransport(TTransportBase, CReadableTransport): - def __init__(self, trans) -> None: ... - def isOpen(self): ... - def open(self): ... - def close(self): ... - def read(self, sz): ... - def readFrame(self): ... - def write(self, buf): ... - def flush(self): ... - @property - def cstringio_buf(self): ... - def cstringio_refill(self, prefix, reqlen): ... - -class TFileObjectTransport(TTransportBase): - fileobj = ... # type: Any - def __init__(self, fileobj) -> None: ... - def isOpen(self): ... - def close(self): ... - def read(self, sz): ... - def write(self, buf): ... - def flush(self): ... - -class TSaslClientTransport(TTransportBase, CReadableTransport): - START = ... # type: Any - OK = ... # type: Any - BAD = ... # type: Any - ERROR = ... # type: Any - COMPLETE = ... # type: Any - transport = ... # type: Any - sasl = ... # type: Any - def __init__(self, transport, host, service, mechanism=..., **sasl_kwargs) -> None: ... - def open(self): ... - def send_sasl_msg(self, status, body): ... - def recv_sasl_msg(self): ... - def write(self, data): ... - def flush(self): ... - def read(self, sz): ... - def close(self): ... - @property - def cstringio_buf(self): ... - def cstringio_refill(self, prefix, reqlen): ... diff --git a/third_party/2and3/thrift/transport/__init__.pyi b/third_party/2and3/thrift/transport/__init__.pyi deleted file mode 100644 index fd3f5f5a2b58..000000000000 --- a/third_party/2and3/thrift/transport/__init__.pyi +++ /dev/null @@ -1,5 +0,0 @@ -# Names in __all__ with no definition: -# THttpClient -# TSocket -# TTransport -# TZlibTransport