Commit Graph

15 Commits

Author SHA1 Message Date
Jakub Stasiak
41f0e7c8b6 Define three argument type() overload (Python 3)
This was missing for some reason while the Python 2.7 stubs have it.

Sample test code:

% cat testtype.py
A = type('A', (), {})
print(A.__name__)

Results before:

% python -m mypy --py2 testtype.py
% python -m mypy testtype.py
testtype.py:1: error: Too many arguments for "type"
%

Results after: type checking passes in both modes.
2016-03-03 09:19:59 +00:00
Hong Minhee
9f1ea9c412 Specify attribute types of SyntaxError 2016-02-29 13:35:30 +09:00
David Fisher
48b3b260d1 Remove invalid Python 3 syntax 2016-02-18 16:25:30 -08:00
Robert T. McGibbon
9933080b04 Update builtins.pyi 2016-02-03 15:20:03 -08:00
Robert T. McGibbon
8739c4a188 Improvements to builtins min/max 2016-02-03 15:16:52 -08:00
Guido van Rossum
e40c3eb8c9 Revert "Fix min()/max() overloading with key= parameter. Fixes #1150."
It has other problems, e.g. complains about max(x, 10) when the type of x is Any.

This reverts commit 6a47ac7116.
2016-01-27 11:10:40 -08:00
Guido van Rossum
6a47ac7116 Fix min()/max() overloading with key= parameter. Fixes #1150. 2016-01-26 11:13:14 -08:00
Guido van Rossum
17d8f20fd5 Add message attribute to class BaseException. 2016-01-25 16:32:47 -08:00
Guido van Rossum
cf82278301 Use plain bytes instead of ByteString in 3/builtins.pyi. 2016-01-25 08:12:46 -08:00
Ismail
fd4d063bb4 Implement fromhex and maketrans method 2016-01-25 15:43:06 +00:00
Matthias Kramm
25a3fac0fd Fix default parameter syntax.
Use 'x:bool = ...' instead of 'x:bool = True' or 'x:bool = False'.
2016-01-22 16:39:15 -08:00
Guido van Rossum
8c2118bace Move contents of builtins/* to stdlib/*. This simplifies finding stubs. 2016-01-12 12:53:18 -08:00
Ben Longbons
56fe787c74 Update a bunch of stubs 2015-10-19 20:02:10 -07:00
Ben Longbons
f2a12774ee Use SupportsBytes 2015-10-12 10:45:04 -07:00
Matthias Kramm
337abed05a add (overwrite with) mypy stubs, if available 2015-09-30 09:59:44 -07:00