From ae14734bd2573bf9bda715a90bfd61551f0a93b0 Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Tue, 12 Jul 2016 17:04:29 -0700 Subject: [PATCH 1/2] Add stub for boto.exception (from stubgen) --- third_party/2.7/boto/exception.pyi | 150 +++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 third_party/2.7/boto/exception.pyi diff --git a/third_party/2.7/boto/exception.pyi b/third_party/2.7/boto/exception.pyi new file mode 100644 index 000000000..a56248d3e --- /dev/null +++ b/third_party/2.7/boto/exception.pyi @@ -0,0 +1,150 @@ +# Stubs for boto.exception (Python 2) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from boto.compat import StandardError + +class BotoClientError(StandardError): + reason = ... # type: Any + def __init__(self, reason, *args): ... + +class SDBPersistenceError(StandardError): ... +class StoragePermissionsError(BotoClientError): ... +class S3PermissionsError(StoragePermissionsError): ... +class GSPermissionsError(StoragePermissionsError): ... + +class BotoServerError(StandardError): + status = ... # type: Any + reason = ... # type: Any + body = ... # type: Any + request_id = ... # type: Any + error_code = ... # type: Any + message = ... # type: Any + box_usage = ... # type: Any + def __init__(self, status, reason, body=None, *args): ... + def __getattr__(self, name): ... + def __setattr__(self, name, value): ... + def startElement(self, name, attrs, connection): ... + def endElement(self, name, value, connection): ... + +class ConsoleOutput: + parent = ... # type: Any + instance_id = ... # type: Any + timestamp = ... # type: Any + comment = ... # type: Any + output = ... # type: Any + def __init__(self, parent=None): ... + def startElement(self, name, attrs, connection): ... + def endElement(self, name, value, connection): ... + +class StorageCreateError(BotoServerError): + bucket = ... # type: Any + def __init__(self, status, reason, body=None): ... + def endElement(self, name, value, connection): ... + +class S3CreateError(StorageCreateError): ... +class GSCreateError(StorageCreateError): ... +class StorageCopyError(BotoServerError): ... +class S3CopyError(StorageCopyError): ... +class GSCopyError(StorageCopyError): ... + +class SQSError(BotoServerError): + detail = ... # type: Any + type = ... # type: Any + def __init__(self, status, reason, body=None): ... + def startElement(self, name, attrs, connection): ... + def endElement(self, name, value, connection): ... + +class SQSDecodeError(BotoClientError): + message = ... # type: Any + def __init__(self, reason, message): ... + +class StorageResponseError(BotoServerError): + resource = ... # type: Any + def __init__(self, status, reason, body=None): ... + def startElement(self, name, attrs, connection): ... + def endElement(self, name, value, connection): ... + +class S3ResponseError(StorageResponseError): ... +class GSResponseError(StorageResponseError): ... + +class EC2ResponseError(BotoServerError): + errors = ... # type: Any + def __init__(self, status, reason, body=None): ... + def startElement(self, name, attrs, connection): ... + request_id = ... # type: Any + def endElement(self, name, value, connection): ... + +class JSONResponseError(BotoServerError): + status = ... # type: Any + reason = ... # type: Any + body = ... # type: Any + error_message = ... # type: Any + error_code = ... # type: Any + def __init__(self, status, reason, body=None, *args): ... + +class DynamoDBResponseError(JSONResponseError): ... +class SWFResponseError(JSONResponseError): ... +class EmrResponseError(BotoServerError): ... + +class _EC2Error: + connection = ... # type: Any + error_code = ... # type: Any + error_message = ... # type: Any + def __init__(self, connection=None): ... + def startElement(self, name, attrs, connection): ... + def endElement(self, name, value, connection): ... + +class SDBResponseError(BotoServerError): ... +class AWSConnectionError(BotoClientError): ... +class StorageDataError(BotoClientError): ... +class S3DataError(StorageDataError): ... +class GSDataError(StorageDataError): ... + +class InvalidUriError(Exception): + message = ... # type: Any + def __init__(self, message): ... + +class InvalidAclError(Exception): + message = ... # type: Any + def __init__(self, message): ... + +class InvalidCorsError(Exception): + message = ... # type: Any + def __init__(self, message): ... + +class NoAuthHandlerFound(Exception): ... + +class InvalidLifecycleConfigError(Exception): + message = ... # type: Any + def __init__(self, message): ... + +class ResumableTransferDisposition: + START_OVER = ... # type: Any + WAIT_BEFORE_RETRY = ... # type: Any + ABORT_CUR_PROCESS = ... # type: Any + ABORT = ... # type: Any + +class ResumableUploadException(Exception): + message = ... # type: Any + disposition = ... # type: Any + def __init__(self, message, disposition): ... + +class ResumableDownloadException(Exception): + message = ... # type: Any + disposition = ... # type: Any + def __init__(self, message, disposition): ... + +class TooManyRecordsException(Exception): + message = ... # type: Any + def __init__(self, message): ... + +class PleaseRetryException(Exception): + message = ... # type: Any + response = ... # type: Any + def __init__(self, message, response=None): ... + +class InvalidInstanceMetadataError(Exception): + MSG = ... # type: Any + def __init__(self, msg): ... From 4b46ca1b66bb0913172e3e1102230c0bbc13037a Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Tue, 12 Jul 2016 17:10:32 -0700 Subject: [PATCH 2/2] Remove unnecessary import --- third_party/2.7/boto/exception.pyi | 1 - 1 file changed, 1 deletion(-) diff --git a/third_party/2.7/boto/exception.pyi b/third_party/2.7/boto/exception.pyi index a56248d3e..2a20228f1 100644 --- a/third_party/2.7/boto/exception.pyi +++ b/third_party/2.7/boto/exception.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -from boto.compat import StandardError class BotoClientError(StandardError): reason = ... # type: Any