Skip to content

Commit 337abed

Browse files
committed
add (overwrite with) mypy stubs, if available
1 parent 69e10b3 commit 337abed

File tree

432 files changed

+22371
-787
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

432 files changed

+22371
-787
lines changed

LICENSE

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
typeshed is licensed under the terms of the Apache license, reproduced below.
2+
3+
= = = = =
4+
15
Apache License
26
Version 2.0, January 2004
37
http://www.apache.org/licenses/
@@ -200,3 +204,34 @@ Apache License
200204
See the License for the specific language governing permissions and
201205
limitations under the License.
202206

207+
= = = = =
208+
209+
Parts of typeshed are licensed under different licenses (like the MIT
210+
License), reproduced below.
211+
212+
= = = = =
213+
214+
The MIT License
215+
216+
Copyright (c) 2015 Jukka Lehtosalo and contributors
217+
218+
Permission is hereby granted, free of charge, to any person obtaining a
219+
copy of this software and associated documentation files (the "Software"),
220+
to deal in the Software without restriction, including without limitation
221+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
222+
and/or sell copies of the Software, and to permit persons to whom the
223+
Software is furnished to do so, subject to the following conditions:
224+
225+
The above copyright notice and this permission notice shall be included in
226+
all copies or substantial portions of the Software.
227+
228+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
229+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
230+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
231+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
232+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
233+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
234+
DEALINGS IN THE SOFTWARE.
235+
236+
= = = = =
237+
File renamed without changes.
File renamed without changes.

builtins/2.7/_random.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Stubs for _random
22

3-
from typing import Optional, Any
3+
# NOTE: These are incomplete!
44

5-
class Random(object):
6-
def __init__(self, seed: x, object = None) -> None: ...
5+
from typing import Any
6+
7+
class Random:
78
def seed(self, x: object = None) -> None: ...
89
def getstate(self) -> tuple: ...
910
def setstate(self, state: tuple) -> None: ...
1011
def random(self) -> float: ...
1112
def getrandbits(self, k: int) -> int: ...
12-
def jumpahead(self, i: int) -> None: ...

builtins/2.7/binascii.pyi

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1-
"""Stubs for the binascii module."""
1+
# Stubs for binascii (Python 2)
22

3-
from typing import Optional
4-
5-
def a2b_base64(string: str) -> str: ...
6-
def a2b_hex(hexstr: str) -> str: ...
7-
def a2b_hqx(string: str) -> str: ...
8-
def a2b_qp(string: str, header: bool = None) -> str: ...
93
def a2b_uu(string: str) -> str: ...
4+
def b2a_uu(data: str) -> str: ...
5+
def a2b_base64(string: str) -> str: ...
106
def b2a_base64(data: str) -> str: ...
11-
def b2a_hex(data: str) -> str: ...
12-
def b2a_hqx(data: str) -> str: ...
7+
def a2b_qp(string: str, header: bool = None) -> str: ...
138
def b2a_qp(data: str, quotetabs: bool = None, istext: bool = None, header: bool = None) -> str: ...
14-
def b2a_uu(data: str) -> str: ...
15-
def crc32(data: str, crc: Optional[int]) -> int: ...
16-
def crc_hqx(data: str, oldcrc: int) -> int: ...
17-
def hexlify(data: str) -> str: ...
18-
def rlecode_hqx(data: str) -> str: ...
9+
def a2b_hqx(string: str) -> str: ...
1910
def rledecode_hqx(data: str) -> str: ...
11+
def rlecode_hqx(data: str) -> str: ...
12+
def b2a_hqx(data: str) -> str: ...
13+
def crc_hqx(data: str, crc: int) -> int: ...
14+
def crc32(data: str, crc: int) -> int: ...
15+
def b2a_hex(data: str) -> str: ...
16+
def hexlify(data: str) -> str: ...
17+
def a2b_hex(hexstr: str) -> str: ...
2018
def unhexlify(hexstr: str) -> str: ...
2119

2220
class Error(Exception): ...

0 commit comments

Comments
 (0)