Skip to content

Commit c7a4c47

Browse files
committed
Update integration
1 parent 2c52ae7 commit c7a4c47

File tree

6 files changed

+120
-126
lines changed

6 files changed

+120
-126
lines changed
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
integration/boto3_stubs/s3_example.py:37: error: Unexpected keyword argument "mfa" for "delete" of "BucketObjectsCollection" [call-arg]
2-
integration/boto3_stubs/s3_example.py:40: error: Argument "Config" to "upload_file" of "Bucket" has incompatible type "str"; expected "TransferConfig | None" [arg-type]
3-
integration/boto3_stubs/s3_example.py:41: error: Missing key "Key" for TypedDict "BucketUploadFileRequestTypeDef" [typeddict-item]
4-
integration/boto3_stubs/s3_example.py:41: error: Extra key "key" for TypedDict "BucketUploadFileRequestTypeDef" [typeddict-unknown-key]
5-
integration/boto3_stubs/s3_example.py:45: error: Missing key "Key" for TypedDict "CopySourceTypeDef" [typeddict-item]
6-
integration/boto3_stubs/s3_example.py:45: error: Extra key "key" for TypedDict "CopySourceTypeDef" [typeddict-unknown-key]
7-
integration/boto3_stubs/s3_example.py:53: error: Argument "CopySource" to "copy_from" of "ObjectSummary" has incompatible type "int"; expected "str | CopySourceTypeDef" [arg-type]
8-
integration/boto3_stubs/s3_example.py:57: error: Argument "RequestPayer" to "abort" of "MultipartUpload" has incompatible type "Literal['none']"; expected "Literal['requester']" [arg-type]
9-
integration/boto3_stubs/s3_example.py:58: error: Argument 1 to "Part" of "MultipartUpload" has incompatible type "str"; expected "int" [arg-type]
10-
integration/boto3_stubs/s3_example.py:59: error: Unexpected keyword argument "wrong_arg" for "delete" of "Bucket" [call-arg]
11-
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]
12-
integration/boto3_stubs/s3_example.py:72: error: Argument "IfModifiedSince" to "get_object" of "S3Client" has incompatible type "None"; expected "datetime | str" [arg-type]
13-
integration/boto3_stubs/s3_example.py:75: error: Unexpected keyword argument "bucket" for "wait" of "BucketExistsWaiter"; did you mean "Bucket"? [call-arg]
14-
integration/boto3_stubs/s3_example.py:82: error: Missing named argument "Key" for "get_object" of "S3Client" [call-arg]
15-
integration/boto3_stubs/s3_example.py:85: error: TypedDict "GetObjectOutputTypeDef" has no key "expiration" [typeddict-item]
16-
integration/boto3_stubs/s3_example.py:85: note: Did you mean "Expiration"?
17-
integration/boto3_stubs/s3_example.py:92: error: Missing key "AllowedOrigins" for TypedDict "CORSRuleTypeDef" [typeddict-item]
18-
integration/boto3_stubs/s3_example.py:92: error: Extra key "Allowedorigins" for TypedDict "CORSRuleTypeDef" [typeddict-unknown-key]
19-
integration/boto3_stubs/s3_example.py:99: error: Argument "Key" to "get_object" of "S3Client" has incompatible type "None"; expected "str" [arg-type]
20-
integration/boto3_stubs/s3_example.py:101: error: "ClientError" has no attribute "operations_name"; maybe "operation_name"? [attr-defined]
21-
integration/boto3_stubs/s3_example.py:109: error: "ClientError" has no attribute "operations_names"; maybe "operation_name"? [attr-defined]
1+
integration/boto3_stubs/s3_example.py:34: error: Unexpected keyword argument "mfa" for "delete" of "BucketObjectsCollection" [call-arg]
2+
integration/boto3_stubs/s3_example.py:37: error: Argument "Config" to "upload_file" of "Bucket" has incompatible type "str"; expected "TransferConfig | None" [arg-type]
3+
integration/boto3_stubs/s3_example.py:38: error: Missing key "Key" for TypedDict "BucketUploadFileRequestTypeDef" [typeddict-item]
4+
integration/boto3_stubs/s3_example.py:38: error: Extra key "key" for TypedDict "BucketUploadFileRequestTypeDef" [typeddict-unknown-key]
5+
integration/boto3_stubs/s3_example.py:42: error: Missing key "Key" for TypedDict "CopySourceTypeDef" [typeddict-item]
6+
integration/boto3_stubs/s3_example.py:42: error: Extra key "key" for TypedDict "CopySourceTypeDef" [typeddict-unknown-key]
7+
integration/boto3_stubs/s3_example.py:50: error: Argument "CopySource" to "copy_from" of "ObjectSummary" has incompatible type "int"; expected "str | CopySourceTypeDef" [arg-type]
8+
integration/boto3_stubs/s3_example.py:54: error: Argument "RequestPayer" to "abort" of "MultipartUpload" has incompatible type "Literal['none']"; expected "Literal['requester']" [arg-type]
9+
integration/boto3_stubs/s3_example.py:55: error: Argument 1 to "Part" of "MultipartUpload" has incompatible type "str"; expected "int" [arg-type]
10+
integration/boto3_stubs/s3_example.py:56: error: Unexpected keyword argument "wrong_arg" for "delete" of "Bucket" [call-arg]
11+
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]
12+
integration/boto3_stubs/s3_example.py:69: error: Argument "IfModifiedSince" to "get_object" of "S3Client" has incompatible type "None"; expected "datetime | str" [arg-type]
13+
integration/boto3_stubs/s3_example.py:72: error: Unexpected keyword argument "bucket" for "wait" of "BucketExistsWaiter"; did you mean "Bucket"? [call-arg]
14+
integration/boto3_stubs/s3_example.py:79: error: Missing named argument "Key" for "get_object" of "S3Client" [call-arg]
15+
integration/boto3_stubs/s3_example.py:82: error: TypedDict "GetObjectOutputTypeDef" has no key "expiration" [typeddict-item]
16+
integration/boto3_stubs/s3_example.py:82: note: Did you mean "Expiration"?
17+
integration/boto3_stubs/s3_example.py:89: error: Missing key "AllowedOrigins" for TypedDict "CORSRuleTypeDef" [typeddict-item]
18+
integration/boto3_stubs/s3_example.py:89: error: Extra key "Allowedorigins" for TypedDict "CORSRuleTypeDef" [typeddict-unknown-key]
19+
integration/boto3_stubs/s3_example.py:96: error: Argument "Key" to "get_object" of "S3Client" has incompatible type "None"; expected "str" [arg-type]
20+
integration/boto3_stubs/s3_example.py:98: error: "ClientError" has no attribute "operations_name"; maybe "operation_name"? [attr-defined]
21+
integration/boto3_stubs/s3_example.py:106: error: "ClientError" has no attribute "operations_names"; maybe "operation_name"? [attr-defined]
2222
Found 20 errors in 1 file (checked 1 source file)

integration/boto3_stubs/pyright/s3_example.py.json

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"message": "No parameter named \"mfa\"",
55
"range": {
66
"start": {
7-
"line": 36,
7+
"line": 33,
88
"character": 26
99
},
1010
"end": {
11-
"line": 36,
11+
"line": 33,
1212
"character": 29
1313
}
1414
},
@@ -19,11 +19,11 @@
1919
"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\"",
2020
"range": {
2121
"start": {
22-
"line": 39,
22+
"line": 36,
2323
"character": 63
2424
},
2525
"end": {
26-
"line": 39,
26+
"line": 36,
2727
"character": 69
2828
}
2929
},
@@ -34,11 +34,11 @@
3434
"message": "Type \"dict[str, str]\" is not assignable to declared type \"BucketUploadFileRequestTypeDef\"\n\u00a0\u00a0\"key\" is an undefined item in type \"BucketUploadFileRequestTypeDef\"",
3535
"range": {
3636
"start": {
37-
"line": 40,
37+
"line": 37,
3838
"character": 66
3939
},
4040
"end": {
41-
"line": 40,
41+
"line": 37,
4242
"character": 71
4343
}
4444
},
@@ -49,11 +49,11 @@
4949
"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\"",
5050
"range": {
5151
"start": {
52-
"line": 44,
52+
"line": 41,
5353
"character": 37
5454
},
5555
"end": {
56-
"line": 44,
56+
"line": 41,
5757
"character": 42
5858
}
5959
},
@@ -64,11 +64,11 @@
6464
"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\"",
6565
"range": {
6666
"start": {
67-
"line": 52,
67+
"line": 49,
6868
"character": 37
6969
},
7070
"end": {
71-
"line": 52,
71+
"line": 49,
7272
"character": 40
7373
}
7474
},
@@ -79,11 +79,11 @@
7979
"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']\"",
8080
"range": {
8181
"start": {
82-
"line": 56,
82+
"line": 53,
8383
"character": 48
8484
},
8585
"end": {
86-
"line": 56,
86+
"line": 53,
8787
"character": 54
8888
}
8989
},
@@ -94,11 +94,11 @@
9494
"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\"",
9595
"range": {
9696
"start": {
97-
"line": 57,
97+
"line": 54,
9898
"character": 34
9999
},
100100
"end": {
101-
"line": 57,
101+
"line": 54,
102102
"character": 37
103103
}
104104
},
@@ -109,11 +109,11 @@
109109
"message": "No parameter named \"wrong_arg\"",
110110
"range": {
111111
"start": {
112-
"line": 58,
112+
"line": 55,
113113
"character": 22
114114
},
115115
"end": {
116-
"line": 58,
116+
"line": 55,
117117
"character": 31
118118
}
119119
},
@@ -124,11 +124,11 @@
124124
"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\"",
125125
"range": {
126126
"start": {
127-
"line": 70,
127+
"line": 67,
128128
"character": 45
129129
},
130130
"end": {
131-
"line": 70,
131+
"line": 67,
132132
"character": 51
133133
}
134134
},
@@ -139,11 +139,11 @@
139139
"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\"",
140140
"range": {
141141
"start": {
142-
"line": 71,
142+
"line": 68,
143143
"character": 66
144144
},
145145
"end": {
146-
"line": 71,
146+
"line": 68,
147147
"character": 70
148148
}
149149
},
@@ -154,11 +154,11 @@
154154
"message": "Argument missing for parameter \"Bucket\"",
155155
"range": {
156156
"start": {
157-
"line": 74,
157+
"line": 71,
158158
"character": 4
159159
},
160160
"end": {
161-
"line": 74,
161+
"line": 71,
162162
"character": 46
163163
}
164164
},
@@ -169,11 +169,11 @@
169169
"message": "No parameter named \"bucket\"",
170170
"range": {
171171
"start": {
172-
"line": 74,
172+
"line": 71,
173173
"character": 30
174174
},
175175
"end": {
176-
"line": 74,
176+
"line": 71,
177177
"character": 36
178178
}
179179
},
@@ -184,11 +184,11 @@
184184
"message": "Argument missing for parameter \"Key\"",
185185
"range": {
186186
"start": {
187-
"line": 81,
187+
"line": 78,
188188
"character": 4
189189
},
190190
"end": {
191-
"line": 81,
191+
"line": 78,
192192
"character": 38
193193
}
194194
},
@@ -199,11 +199,11 @@
199199
"message": "Could not access item in TypedDict\n\u00a0\u00a0\"expiration\" is not a defined key in \"GetObjectOutputTypeDef\"",
200200
"range": {
201201
"start": {
202-
"line": 84,
202+
"line": 81,
203203
"character": 17
204204
},
205205
"end": {
206-
"line": 84,
206+
"line": 81,
207207
"character": 76
208208
}
209209
},
@@ -214,11 +214,11 @@
214214
"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\"",
215215
"range": {
216216
"start": {
217-
"line": 91,
217+
"line": 88,
218218
"character": 55
219219
},
220220
"end": {
221-
"line": 91,
221+
"line": 88,
222222
"character": 71
223223
}
224224
},
@@ -229,11 +229,11 @@
229229
"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\"",
230230
"range": {
231231
"start": {
232-
"line": 98,
232+
"line": 95,
233233
"character": 47
234234
},
235235
"end": {
236-
"line": 98,
236+
"line": 95,
237237
"character": 51
238238
}
239239
},
@@ -244,11 +244,11 @@
244244
"message": "Cannot access attribute \"operations_name\" for class \"ClientError\"\n\u00a0\u00a0Attribute \"operations_name\" is unknown",
245245
"range": {
246246
"start": {
247-
"line": 100,
247+
"line": 97,
248248
"character": 16
249249
},
250250
"end": {
251-
"line": 100,
251+
"line": 97,
252252
"character": 31
253253
}
254254
},
@@ -259,11 +259,11 @@
259259
"message": "Cannot access attribute \"operations_names\" for class \"ClientError\"\n\u00a0\u00a0Attribute \"operations_names\" is unknown",
260260
"range": {
261261
"start": {
262-
"line": 108,
262+
"line": 105,
263263
"character": 16
264264
},
265265
"end": {
266-
"line": 108,
266+
"line": 105,
267267
"character": 32
268268
}
269269
},

integration/boto3_stubs/s3_example.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@
88
```
99
"""
1010

11-
from typing import TYPE_CHECKING
12-
1311
import boto3
1412
from boto3.session import Session
1513

16-
if TYPE_CHECKING:
17-
from mypy_boto3_s3.client import S3Client
18-
from mypy_boto3_s3.service_resource import Bucket, S3ServiceResource
19-
from mypy_boto3_s3.type_defs import BucketUploadFileRequestTypeDef
14+
from mypy_boto3_s3.client import S3Client
15+
from mypy_boto3_s3.service_resource import Bucket, S3ServiceResource
16+
from mypy_boto3_s3.type_defs import BucketUploadFileRequestTypeDef
2017

2118

2219
def s3_resource_example() -> None:

0 commit comments

Comments
 (0)