Skip to content

Commit

Permalink
Update integration
Browse files Browse the repository at this point in the history
  • Loading branch information
vemel committed Jan 6, 2025
1 parent 2c52ae7 commit c7a4c47
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 126 deletions.
42 changes: 21 additions & 21 deletions integration/boto3_stubs/mypy/s3_example.py.out
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
integration/boto3_stubs/s3_example.py:37: error: Unexpected keyword argument "mfa" for "delete" of "BucketObjectsCollection" [call-arg]
integration/boto3_stubs/s3_example.py:40: error: Argument "Config" to "upload_file" of "Bucket" has incompatible type "str"; expected "TransferConfig | None" [arg-type]
integration/boto3_stubs/s3_example.py:41: error: Missing key "Key" for TypedDict "BucketUploadFileRequestTypeDef" [typeddict-item]
integration/boto3_stubs/s3_example.py:41: error: Extra key "key" for TypedDict "BucketUploadFileRequestTypeDef" [typeddict-unknown-key]
integration/boto3_stubs/s3_example.py:45: error: Missing key "Key" for TypedDict "CopySourceTypeDef" [typeddict-item]
integration/boto3_stubs/s3_example.py:45: error: Extra key "key" for TypedDict "CopySourceTypeDef" [typeddict-unknown-key]
integration/boto3_stubs/s3_example.py:53: error: Argument "CopySource" to "copy_from" of "ObjectSummary" has incompatible type "int"; expected "str | CopySourceTypeDef" [arg-type]
integration/boto3_stubs/s3_example.py:57: error: Argument "RequestPayer" to "abort" of "MultipartUpload" has incompatible type "Literal['none']"; expected "Literal['requester']" [arg-type]
integration/boto3_stubs/s3_example.py:58: error: Argument 1 to "Part" of "MultipartUpload" has incompatible type "str"; expected "int" [arg-type]
integration/boto3_stubs/s3_example.py:59: error: Unexpected keyword argument "wrong_arg" for "delete" of "Bucket" [call-arg]
integration/boto3_stubs/s3_example.py:71: error: Argument 3 to "download_fileobj" of "S3Client" has incompatible type "bytes"; expected "IO[Any] | StreamingBody" [arg-type]
integration/boto3_stubs/s3_example.py:72: error: Argument "IfModifiedSince" to "get_object" of "S3Client" has incompatible type "None"; expected "datetime | str" [arg-type]
integration/boto3_stubs/s3_example.py:75: error: Unexpected keyword argument "bucket" for "wait" of "BucketExistsWaiter"; did you mean "Bucket"? [call-arg]
integration/boto3_stubs/s3_example.py:82: error: Missing named argument "Key" for "get_object" of "S3Client" [call-arg]
integration/boto3_stubs/s3_example.py:85: error: TypedDict "GetObjectOutputTypeDef" has no key "expiration" [typeddict-item]
integration/boto3_stubs/s3_example.py:85: note: Did you mean "Expiration"?
integration/boto3_stubs/s3_example.py:92: error: Missing key "AllowedOrigins" for TypedDict "CORSRuleTypeDef" [typeddict-item]
integration/boto3_stubs/s3_example.py:92: error: Extra key "Allowedorigins" for TypedDict "CORSRuleTypeDef" [typeddict-unknown-key]
integration/boto3_stubs/s3_example.py:99: error: Argument "Key" to "get_object" of "S3Client" has incompatible type "None"; expected "str" [arg-type]
integration/boto3_stubs/s3_example.py:101: error: "ClientError" has no attribute "operations_name"; maybe "operation_name"? [attr-defined]
integration/boto3_stubs/s3_example.py:109: error: "ClientError" has no attribute "operations_names"; maybe "operation_name"? [attr-defined]
integration/boto3_stubs/s3_example.py:34: error: Unexpected keyword argument "mfa" for "delete" of "BucketObjectsCollection" [call-arg]
integration/boto3_stubs/s3_example.py:37: error: Argument "Config" to "upload_file" of "Bucket" has incompatible type "str"; expected "TransferConfig | None" [arg-type]
integration/boto3_stubs/s3_example.py:38: error: Missing key "Key" for TypedDict "BucketUploadFileRequestTypeDef" [typeddict-item]
integration/boto3_stubs/s3_example.py:38: error: Extra key "key" for TypedDict "BucketUploadFileRequestTypeDef" [typeddict-unknown-key]
integration/boto3_stubs/s3_example.py:42: error: Missing key "Key" for TypedDict "CopySourceTypeDef" [typeddict-item]
integration/boto3_stubs/s3_example.py:42: error: Extra key "key" for TypedDict "CopySourceTypeDef" [typeddict-unknown-key]
integration/boto3_stubs/s3_example.py:50: error: Argument "CopySource" to "copy_from" of "ObjectSummary" has incompatible type "int"; expected "str | CopySourceTypeDef" [arg-type]
integration/boto3_stubs/s3_example.py:54: error: Argument "RequestPayer" to "abort" of "MultipartUpload" has incompatible type "Literal['none']"; expected "Literal['requester']" [arg-type]
integration/boto3_stubs/s3_example.py:55: error: Argument 1 to "Part" of "MultipartUpload" has incompatible type "str"; expected "int" [arg-type]
integration/boto3_stubs/s3_example.py:56: error: Unexpected keyword argument "wrong_arg" for "delete" of "Bucket" [call-arg]
integration/boto3_stubs/s3_example.py:68: error: Argument 3 to "download_fileobj" of "S3Client" has incompatible type "bytes"; expected "IO[Any] | StreamingBody" [arg-type]
integration/boto3_stubs/s3_example.py:69: error: Argument "IfModifiedSince" to "get_object" of "S3Client" has incompatible type "None"; expected "datetime | str" [arg-type]
integration/boto3_stubs/s3_example.py:72: error: Unexpected keyword argument "bucket" for "wait" of "BucketExistsWaiter"; did you mean "Bucket"? [call-arg]
integration/boto3_stubs/s3_example.py:79: error: Missing named argument "Key" for "get_object" of "S3Client" [call-arg]
integration/boto3_stubs/s3_example.py:82: error: TypedDict "GetObjectOutputTypeDef" has no key "expiration" [typeddict-item]
integration/boto3_stubs/s3_example.py:82: note: Did you mean "Expiration"?
integration/boto3_stubs/s3_example.py:89: error: Missing key "AllowedOrigins" for TypedDict "CORSRuleTypeDef" [typeddict-item]
integration/boto3_stubs/s3_example.py:89: error: Extra key "Allowedorigins" for TypedDict "CORSRuleTypeDef" [typeddict-unknown-key]
integration/boto3_stubs/s3_example.py:96: error: Argument "Key" to "get_object" of "S3Client" has incompatible type "None"; expected "str" [arg-type]
integration/boto3_stubs/s3_example.py:98: error: "ClientError" has no attribute "operations_name"; maybe "operation_name"? [attr-defined]
integration/boto3_stubs/s3_example.py:106: error: "ClientError" has no attribute "operations_names"; maybe "operation_name"? [attr-defined]
Found 20 errors in 1 file (checked 1 source file)
72 changes: 36 additions & 36 deletions integration/boto3_stubs/pyright/s3_example.py.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"message": "No parameter named \"mfa\"",
"range": {
"start": {
"line": 36,
"line": 33,
"character": 26
},
"end": {
"line": 36,
"line": 33,
"character": 29
}
},
Expand All @@ -19,11 +19,11 @@
"message": "Argument of type \"Literal['test']\" cannot be assigned to parameter \"Config\" of type \"TransferConfig | None\" in function \"upload_file\"\n\u00a0\u00a0Type \"Literal['test']\" is not assignable to type \"TransferConfig | None\"\n\u00a0\u00a0\u00a0\u00a0\"Literal['test']\" is not assignable to \"TransferConfig\"\n\u00a0\u00a0\u00a0\u00a0\"Literal['test']\" is not assignable to \"None\"",
"range": {
"start": {
"line": 39,
"line": 36,
"character": 63
},
"end": {
"line": 39,
"line": 36,
"character": 69
}
},
Expand All @@ -34,11 +34,11 @@
"message": "Type \"dict[str, str]\" is not assignable to declared type \"BucketUploadFileRequestTypeDef\"\n\u00a0\u00a0\"key\" is an undefined item in type \"BucketUploadFileRequestTypeDef\"",
"range": {
"start": {
"line": 40,
"line": 37,
"character": 66
},
"end": {
"line": 40,
"line": 37,
"character": 71
}
},
Expand All @@ -49,11 +49,11 @@
"message": "Argument of type \"dict[str, str]\" cannot be assigned to parameter \"CopySource\" of type \"CopySourceTypeDef\" in function \"copy\"\n\u00a0\u00a0\"key\" is an undefined item in type \"CopySourceTypeDef\"",
"range": {
"start": {
"line": 44,
"line": 41,
"character": 37
},
"end": {
"line": 44,
"line": 41,
"character": 42
}
},
Expand All @@ -64,11 +64,11 @@
"message": "Argument of type \"Literal[123]\" cannot be assigned to parameter \"CopySource\" of type \"CopySourceOrStrTypeDef\" in function \"copy_from\"\n\u00a0\u00a0Type \"Literal[123]\" is not assignable to type \"CopySourceOrStrTypeDef\"\n\u00a0\u00a0\u00a0\u00a0\"Literal[123]\" is not assignable to \"str\"\n\u00a0\u00a0\u00a0\u00a0\"Literal[123]\" is not assignable to \"CopySourceTypeDef\"",
"range": {
"start": {
"line": 52,
"line": 49,
"character": 37
},
"end": {
"line": 52,
"line": 49,
"character": 40
}
},
Expand All @@ -79,11 +79,11 @@
"message": "Argument of type \"Literal['none']\" cannot be assigned to parameter \"RequestPayer\" of type \"Literal['requester']\" in function \"abort\"\n\u00a0\u00a0\"Literal['none']\" is not assignable to type \"Literal['requester']\"",
"range": {
"start": {
"line": 56,
"line": 53,
"character": 48
},
"end": {
"line": 56,
"line": 53,
"character": 54
}
},
Expand All @@ -94,11 +94,11 @@
"message": "Argument of type \"Literal['1']\" cannot be assigned to parameter \"part_number\" of type \"int\" in function \"Part\"\n\u00a0\u00a0\"Literal['1']\" is not assignable to \"int\"",
"range": {
"start": {
"line": 57,
"line": 54,
"character": 34
},
"end": {
"line": 57,
"line": 54,
"character": 37
}
},
Expand All @@ -109,11 +109,11 @@
"message": "No parameter named \"wrong_arg\"",
"range": {
"start": {
"line": 58,
"line": 55,
"character": 22
},
"end": {
"line": 58,
"line": 55,
"character": 31
}
},
Expand All @@ -124,11 +124,11 @@
"message": "Argument of type \"Literal[b\"asd\"]\" cannot be assigned to parameter \"Fileobj\" of type \"FileobjTypeDef\" in function \"download_fileobj\"\n\u00a0\u00a0Type \"Literal[b\"asd\"]\" is not assignable to type \"FileobjTypeDef\"\n\u00a0\u00a0\u00a0\u00a0\"Literal[b\"asd\"]\" is not assignable to \"IO[Any]\"\n\u00a0\u00a0\u00a0\u00a0\"Literal[b\"asd\"]\" is not assignable to \"StreamingBody\"",
"range": {
"start": {
"line": 70,
"line": 67,
"character": 45
},
"end": {
"line": 70,
"line": 67,
"character": 51
}
},
Expand All @@ -139,11 +139,11 @@
"message": "Argument of type \"None\" cannot be assigned to parameter \"IfModifiedSince\" of type \"TimestampTypeDef\" in function \"get_object\"\n\u00a0\u00a0Type \"None\" is not assignable to type \"TimestampTypeDef\"\n\u00a0\u00a0\u00a0\u00a0\"None\" is not assignable to \"datetime\"\n\u00a0\u00a0\u00a0\u00a0\"None\" is not assignable to \"str\"",
"range": {
"start": {
"line": 71,
"line": 68,
"character": 66
},
"end": {
"line": 71,
"line": 68,
"character": 70
}
},
Expand All @@ -154,11 +154,11 @@
"message": "Argument missing for parameter \"Bucket\"",
"range": {
"start": {
"line": 74,
"line": 71,
"character": 4
},
"end": {
"line": 74,
"line": 71,
"character": 46
}
},
Expand All @@ -169,11 +169,11 @@
"message": "No parameter named \"bucket\"",
"range": {
"start": {
"line": 74,
"line": 71,
"character": 30
},
"end": {
"line": 74,
"line": 71,
"character": 36
}
},
Expand All @@ -184,11 +184,11 @@
"message": "Argument missing for parameter \"Key\"",
"range": {
"start": {
"line": 81,
"line": 78,
"character": 4
},
"end": {
"line": 81,
"line": 78,
"character": 38
}
},
Expand All @@ -199,11 +199,11 @@
"message": "Could not access item in TypedDict\n\u00a0\u00a0\"expiration\" is not a defined key in \"GetObjectOutputTypeDef\"",
"range": {
"start": {
"line": 84,
"line": 81,
"character": 17
},
"end": {
"line": 84,
"line": 81,
"character": 76
}
},
Expand All @@ -214,11 +214,11 @@
"message": "Argument of type \"dict[str, list[dict[str, tuple[Literal['get']] | list[str]]]]\" cannot be assigned to parameter \"CORSConfiguration\" of type \"CORSConfigurationTypeDef\" in function \"put_bucket_cors\"\n\u00a0\u00a0\"Allowedorigins\" is an undefined item in type \"CORSRuleTypeDef\"",
"range": {
"start": {
"line": 91,
"line": 88,
"character": 55
},
"end": {
"line": 91,
"line": 88,
"character": 71
}
},
Expand All @@ -229,11 +229,11 @@
"message": "Argument of type \"None\" cannot be assigned to parameter \"Key\" of type \"str\" in function \"get_object\"\n\u00a0\u00a0\"None\" is not assignable to \"str\"",
"range": {
"start": {
"line": 98,
"line": 95,
"character": 47
},
"end": {
"line": 98,
"line": 95,
"character": 51
}
},
Expand All @@ -244,11 +244,11 @@
"message": "Cannot access attribute \"operations_name\" for class \"ClientError\"\n\u00a0\u00a0Attribute \"operations_name\" is unknown",
"range": {
"start": {
"line": 100,
"line": 97,
"character": 16
},
"end": {
"line": 100,
"line": 97,
"character": 31
}
},
Expand All @@ -259,11 +259,11 @@
"message": "Cannot access attribute \"operations_names\" for class \"ClientError\"\n\u00a0\u00a0Attribute \"operations_names\" is unknown",
"range": {
"start": {
"line": 108,
"line": 105,
"character": 16
},
"end": {
"line": 108,
"line": 105,
"character": 32
}
},
Expand Down
9 changes: 3 additions & 6 deletions integration/boto3_stubs/s3_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@
```
"""

from typing import TYPE_CHECKING

import boto3
from boto3.session import Session

if TYPE_CHECKING:
from mypy_boto3_s3.client import S3Client
from mypy_boto3_s3.service_resource import Bucket, S3ServiceResource
from mypy_boto3_s3.type_defs import BucketUploadFileRequestTypeDef
from mypy_boto3_s3.client import S3Client
from mypy_boto3_s3.service_resource import Bucket, S3ServiceResource
from mypy_boto3_s3.type_defs import BucketUploadFileRequestTypeDef


def s3_resource_example() -> None:
Expand Down
Loading

0 comments on commit c7a4c47

Please sign in to comment.