Skip to content

Commit

Permalink
Fix aiobotocore integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
vemel committed Dec 28, 2024
1 parent 3eb92b3 commit bfc4799
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 37 deletions.
26 changes: 13 additions & 13 deletions integration/types_aiobotocore/mypy/s3_example.py.out
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
integration/types_aiobotocore/s3_example.py:33: error: Argument 3 to "download_fileobj" of "S3Client" has incompatible type "bytes"; expected "IO[Any] | StreamingBody" [arg-type]
integration/types_aiobotocore/s3_example.py:34: error: Argument "IfModifiedSince" to "get_object" of "S3Client" has incompatible type "None"; expected "datetime | str" [arg-type]
integration/types_aiobotocore/s3_example.py:37: error: Unexpected keyword argument "bucket" for "wait" of "BucketExistsWaiter"; did you mean "Bucket"? [call-arg]
integration/types_aiobotocore/s3_example.py:41: error: Value of type "Coroutine[Any, Any, CreateBucketOutputTypeDef]" is not indexable [index]
integration/types_aiobotocore/s3_example.py:41: note: Maybe you forgot to use "await"?
integration/types_aiobotocore/s3_example.py:44: error: Missing named argument "Key" for "get_object" of "S3Client" [call-arg]
integration/types_aiobotocore/s3_example.py:47: error: TypedDict "GetObjectOutputTypeDef" has no key "expiration" [typeddict-item]
integration/types_aiobotocore/s3_example.py:47: note: Did you mean "Expiration"?
integration/types_aiobotocore/s3_example.py:54: error: Missing key "AllowedOrigins" for TypedDict "CORSRuleTypeDef" [typeddict-item]
integration/types_aiobotocore/s3_example.py:54: error: Extra key "Allowedorigins" for TypedDict "CORSRuleTypeDef" [typeddict-unknown-key]
integration/types_aiobotocore/s3_example.py:61: error: Argument "Key" to "get_object" of "S3Client" has incompatible type "None"; expected "str" [arg-type]
integration/types_aiobotocore/s3_example.py:63: error: "ClientError" has no attribute "operations_name"; maybe "operation_name"? [attr-defined]
integration/types_aiobotocore/s3_example.py:67: error: "AsyncIterator[bytes]" has no attribute "__iter__"; maybe "__aiter__"? (not iterable) [attr-defined]
integration/types_aiobotocore/s3_example.py:31: error: Argument 3 to "download_fileobj" of "S3Client" has incompatible type "bytes"; expected "IO[Any] | StreamingBody" [arg-type]
integration/types_aiobotocore/s3_example.py:32: error: Argument "IfModifiedSince" to "get_object" of "S3Client" has incompatible type "None"; expected "datetime | str" [arg-type]
integration/types_aiobotocore/s3_example.py:35: error: Unexpected keyword argument "bucket" for "wait" of "BucketExistsWaiter"; did you mean "Bucket"? [call-arg]
integration/types_aiobotocore/s3_example.py:39: error: Value of type "Coroutine[Any, Any, CreateBucketOutputTypeDef]" is not indexable [index]
integration/types_aiobotocore/s3_example.py:39: note: Maybe you forgot to use "await"?
integration/types_aiobotocore/s3_example.py:42: error: Missing named argument "Key" for "get_object" of "S3Client" [call-arg]
integration/types_aiobotocore/s3_example.py:45: error: TypedDict "GetObjectOutputTypeDef" has no key "expiration" [typeddict-item]
integration/types_aiobotocore/s3_example.py:45: note: Did you mean "Expiration"?
integration/types_aiobotocore/s3_example.py:52: error: Missing key "AllowedOrigins" for TypedDict "CORSRuleTypeDef" [typeddict-item]
integration/types_aiobotocore/s3_example.py:52: error: Extra key "Allowedorigins" for TypedDict "CORSRuleTypeDef" [typeddict-unknown-key]
integration/types_aiobotocore/s3_example.py:59: error: Argument "Key" to "get_object" of "S3Client" has incompatible type "None"; expected "str" [arg-type]
integration/types_aiobotocore/s3_example.py:61: error: "ClientError" has no attribute "operations_name"; maybe "operation_name"? [attr-defined]
integration/types_aiobotocore/s3_example.py:65: error: "AsyncIterator[bytes]" has no attribute "__iter__"; maybe "__aiter__"? (not iterable) [attr-defined]
Found 11 errors in 1 file (checked 1 source file)
40 changes: 20 additions & 20 deletions integration/types_aiobotocore/pyright/s3_example.py.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,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": 32,
"line": 30,
"character": 55
},
"end": {
"line": 32,
"line": 30,
"character": 61
}
},
Expand All @@ -19,11 +19,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": 33,
"line": 31,
"character": 76
},
"end": {
"line": 33,
"line": 31,
"character": 80
}
},
Expand All @@ -34,11 +34,11 @@
"message": "Argument missing for parameter \"Bucket\"",
"range": {
"start": {
"line": 36,
"line": 34,
"character": 14
},
"end": {
"line": 36,
"line": 34,
"character": 56
}
},
Expand All @@ -49,11 +49,11 @@
"message": "No parameter named \"bucket\"",
"range": {
"start": {
"line": 36,
"line": 34,
"character": 40
},
"end": {
"line": 36,
"line": 34,
"character": 46
}
},
Expand All @@ -64,11 +64,11 @@
"message": "\"__getitem__\" method not defined on type \"Coroutine[Any, Any, CreateBucketOutputTypeDef]\"",
"range": {
"start": {
"line": 40,
"line": 38,
"character": 8
},
"end": {
"line": 40,
"line": 38,
"character": 16
}
},
Expand All @@ -79,11 +79,11 @@
"message": "Argument missing for parameter \"Key\"",
"range": {
"start": {
"line": 43,
"line": 41,
"character": 26
},
"end": {
"line": 43,
"line": 41,
"character": 60
}
},
Expand All @@ -94,11 +94,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": 53,
"line": 51,
"character": 59
},
"end": {
"line": 53,
"line": 51,
"character": 75
}
},
Expand All @@ -109,11 +109,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": 60,
"line": 58,
"character": 57
},
"end": {
"line": 60,
"line": 58,
"character": 61
}
},
Expand All @@ -124,11 +124,11 @@
"message": "Cannot access attribute \"operations_name\" for class \"ClientError\"\n\u00a0\u00a0Attribute \"operations_name\" is unknown",
"range": {
"start": {
"line": 62,
"line": 60,
"character": 20
},
"end": {
"line": 62,
"line": 60,
"character": 35
}
},
Expand All @@ -139,11 +139,11 @@
"message": "\"AsyncIterator[bytes]\" is not iterable\n\u00a0\u00a0\"__iter__\" method not defined",
"range": {
"start": {
"line": 66,
"line": 64,
"character": 21
},
"end": {
"line": 66,
"line": 64,
"character": 45
}
},
Expand Down
6 changes: 2 additions & 4 deletions integration/types_aiobotocore/s3_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
```
"""

from typing import TYPE_CHECKING

from aiobotocore.session import get_session

if TYPE_CHECKING:
from types_aiobotocore_s3.client import S3Client
from types_aiobotocore_s3.client import S3Client
from types_aiobotocore_s3.service_resource import S3ServiceResource


async def s3_client_example() -> None:
Expand Down

0 comments on commit bfc4799

Please sign in to comment.