Skip to content

Commit abc927b

Browse files
committedJul 30, 2022
Type-ignored AwsCredentials
1 parent 66067ab commit abc927b

File tree

4 files changed

+18
-149
lines changed

4 files changed

+18
-149
lines changed
 

Diff for: ‎botocore-stubs/crt/auth.pyi

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import Dict
22

33
# FIXME: awscrt is untyped
4-
from awscrt.auth import AwsCredentials # type: ignore
4+
from awscrt.auth import AwsCredentials
55
from botocore.auth import SIGNED_HEADERS_BLACKLIST as SIGNED_HEADERS_BLACKLIST
66
from botocore.auth import STREAMING_UNSIGNED_PAYLOAD_TRAILER as STREAMING_UNSIGNED_PAYLOAD_TRAILER
77
from botocore.auth import UNSIGNED_PAYLOAD as UNSIGNED_PAYLOAD
@@ -17,7 +17,12 @@ from botocore.utils import percent_encode_sequence as percent_encode_sequence
1717
class CrtSigV4Auth(BaseSigner):
1818
REQUIRES_REGION: bool = ...
1919

20-
def __init__(self, credentials: AwsCredentials, service_name: str, region_name: str) -> None:
20+
def __init__(
21+
self,
22+
credentials: AwsCredentials, # type: ignore
23+
service_name: str,
24+
region_name: str,
25+
) -> None:
2126
self.credentials: AwsCredentials = ...
2227
def add_auth(self, request: AWSRequest) -> None: ...
2328

@@ -26,7 +31,12 @@ class CrtS3SigV4Auth(CrtSigV4Auth): ...
2631
class CrtSigV4AsymAuth(BaseSigner):
2732
REQUIRES_REGION: bool = ...
2833

29-
def __init__(self, credentials: AwsCredentials, service_name: str, region_name: str) -> None:
34+
def __init__(
35+
self,
36+
credentials: AwsCredentials, # type: ignore
37+
service_name: str,
38+
region_name: str,
39+
) -> None:
3040
self.credentials: AwsCredentials = ...
3141
def add_auth(self, request: AWSRequest) -> None: ...
3242

@@ -37,7 +47,7 @@ class CrtSigV4AsymQueryAuth(CrtSigV4AsymAuth):
3747

3848
def __init__(
3949
self,
40-
credentials: AwsCredentials,
50+
credentials: AwsCredentials, # type: ignore
4151
service_name: str,
4252
region_name: str,
4353
expires: int = ...,
@@ -49,7 +59,7 @@ class CrtSigV4QueryAuth(CrtSigV4Auth):
4959
DEFAULT_EXPIRES: int = ...
5060
def __init__(
5161
self,
52-
credentials: AwsCredentials,
62+
credentials: AwsCredentials, # type: ignore
5363
service_name: str,
5464
region_name: str,
5565
expires: int = ...,

Diff for: ‎botocore-stubs/py.typed

-1
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
partial

Diff for: ‎istub.yml

+2-143
Original file line numberDiff line numberDiff line change
@@ -8,146 +8,5 @@ packages:
88
stubtest: true
99
snapshots:
1010
stubtest: |-
11-
error: botocore.docs failed to find stubs
12-
Stub:
13-
MISSING
14-
Runtime:
15-
<module 'botocore.docs' from './botocore/docs/__init__.py'>
16-
17-
error: botocore.docs.bcdoc failed to find stubs
18-
Stub:
19-
MISSING
20-
Runtime:
21-
<module 'botocore.docs.bcdoc' from './botocore/docs/bcdoc/__init__.py'>
22-
23-
error: botocore.docs.bcdoc.docstringparser failed to find stubs
24-
Stub:
25-
MISSING
26-
Runtime:
27-
<module 'botocore.docs.bcdoc.docstringparser' from './botocore/docs/bcdoc/docstringparser.py'>
28-
29-
error: botocore.docs.bcdoc.restdoc failed to find stubs
30-
Stub:
31-
MISSING
32-
Runtime:
33-
<module 'botocore.docs.bcdoc.restdoc' from './botocore/docs/bcdoc/restdoc.py'>
34-
35-
error: botocore.docs.bcdoc.style failed to find stubs
36-
Stub:
37-
MISSING
38-
Runtime:
39-
<module 'botocore.docs.bcdoc.style' from './botocore/docs/bcdoc/style.py'>
40-
41-
error: botocore.docs.client failed to find stubs
42-
Stub:
43-
MISSING
44-
Runtime:
45-
<module 'botocore.docs.client' from './botocore/docs/client.py'>
46-
47-
error: botocore.docs.docstring failed to find stubs
48-
Stub:
49-
MISSING
50-
Runtime:
51-
<module 'botocore.docs.docstring' from './botocore/docs/docstring.py'>
52-
53-
error: botocore.docs.example failed to find stubs
54-
Stub:
55-
MISSING
56-
Runtime:
57-
<module 'botocore.docs.example' from './botocore/docs/example.py'>
58-
59-
error: botocore.docs.method failed to find stubs
60-
Stub:
61-
MISSING
62-
Runtime:
63-
<module 'botocore.docs.method' from './botocore/docs/method.py'>
64-
65-
error: botocore.docs.paginator failed to find stubs
66-
Stub:
67-
MISSING
68-
Runtime:
69-
<module 'botocore.docs.paginator' from './botocore/docs/paginator.py'>
70-
71-
error: botocore.docs.params failed to find stubs
72-
Stub:
73-
MISSING
74-
Runtime:
75-
<module 'botocore.docs.params' from './botocore/docs/params.py'>
76-
77-
error: botocore.docs.service failed to find stubs
78-
Stub:
79-
MISSING
80-
Runtime:
81-
<module 'botocore.docs.service' from './botocore/docs/service.py'>
82-
83-
error: botocore.docs.shape failed to find stubs
84-
Stub:
85-
MISSING
86-
Runtime:
87-
<module 'botocore.docs.shape' from './botocore/docs/shape.py'>
88-
89-
error: botocore.docs.sharedexample failed to find stubs
90-
Stub:
91-
MISSING
92-
Runtime:
93-
<module 'botocore.docs.sharedexample' from './botocore/docs/sharedexample.py'>
94-
95-
error: botocore.docs.utils failed to find stubs
96-
Stub:
97-
MISSING
98-
Runtime:
99-
<module 'botocore.docs.utils' from './botocore/docs/utils.py'>
100-
101-
error: botocore.docs.waiter failed to find stubs
102-
Stub:
103-
MISSING
104-
Runtime:
105-
<module 'botocore.docs.waiter' from './botocore/docs/waiter.py'>
106-
107-
error: botocore.httpchecksum failed to find stubs
108-
Stub:
109-
MISSING
110-
Runtime:
111-
<module 'botocore.httpchecksum' from './botocore/httpchecksum.py'>
112-
113-
error: botocore.vendored failed to find stubs
114-
Stub:
115-
MISSING
116-
Runtime:
117-
<module 'botocore.vendored' from './botocore/vendored/__init__.py'>
118-
119-
error: botocore.vendored.requests failed to find stubs
120-
Stub:
121-
MISSING
122-
Runtime:
123-
<module 'botocore.vendored.requests' from './botocore/vendored/requests/__init__.py'>
124-
125-
error: botocore.vendored.requests.exceptions failed to find stubs
126-
Stub:
127-
MISSING
128-
Runtime:
129-
<module 'botocore.vendored.requests.exceptions' from './botocore/vendored/requests/exceptions.py'>
130-
131-
error: botocore.vendored.requests.packages failed to find stubs
132-
Stub:
133-
MISSING
134-
Runtime:
135-
<module 'botocore.vendored.requests.packages' from './botocore/vendored/requests/packages/__init__.py'>
136-
137-
error: botocore.vendored.requests.packages.urllib3 failed to find stubs
138-
Stub:
139-
MISSING
140-
Runtime:
141-
<module 'botocore.vendored.requests.packages.urllib3' from './botocore/vendored/requests/packages/urllib3/__init__.py'>
142-
143-
error: botocore.vendored.requests.packages.urllib3.exceptions failed to find stubs
144-
Stub:
145-
MISSING
146-
Runtime:
147-
<module 'botocore.vendored.requests.packages.urllib3.exceptions' from './botocore/vendored/requests/packages/urllib3/exceptions.py'>
148-
149-
error: botocore.vendored.six failed to find stubs
150-
Stub:
151-
MISSING
152-
Runtime:
153-
<module 'botocore.vendored.six' from './botocore/vendored/six.py'>
11+
error: not checking stubs due to mypy build errors:
12+
botocore-stubs/crt/auth.pyi:4: error: Skipping analyzing "awscrt.auth": module is installed, but missing library stubs or py.typed marker

Diff for: ‎scripts/before_commit.sh

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ set -e
44
ROOT_PATH=$(dirname $(dirname $0))
55
cd $ROOT_PATH
66

7+
poetry run npx pyright botocore-stubs
78
poetry run flake8 botocore-stubs
89
poetry run black botocore-stubs
910
poetry run isort botocore-stubs

0 commit comments

Comments
 (0)
Please sign in to comment.