Guido van Rossum
1e1694276c
Oops, should use ... not None.
2016-08-02 11:06:52 -07:00
Guido van Rossum
2bb6856456
Change local to type Any and add link to mypy bug.
2016-08-02 10:59:11 -07:00
Guido van Rossum
9debde04e9
Make type of threading.locals more lenient.
2016-08-02 09:39:00 -07:00
Guido van Rossum
47f2746526
Fix the definitions of BadZip{f,F}ile. ( #432 )
...
In 2.7, only BadZipfile exists. In 3.x, both exist.
2016-08-02 09:04:45 -07:00
Alvaro Caceres
e60c3de954
Update pytype blacklist. ( #430 )
...
Broke travis with recent pytype push
2016-08-02 07:45:46 -07:00
Guido van Rossum
6e596e9609
Fix decimal and contextlib ( #428 )
...
* Decimal does not support __round__, and its __abs__ returns Decimal.
* Fix contextmanager signature too.
2016-08-02 07:39:13 -07:00
Roy Williams
fd66ff21ae
Add __version__ to protobuf module ( #429 )
2016-08-01 21:32:03 -07:00
Valérian Rousset
ee02a8a968
Improve threading ( #403 )
...
* initial stubgen
* comment everything
* 17.1.0 done
* 17.1.1 done
* 17.1.2 done
* 17.1.3 done
* 17.1.4 done
* 17.1.5 done
* reorder __enter__, __exit__
* 17.1.6 done
* 17.1.7 done
* 17.1.8 done
* 17.1.9 done
* cleanup, py3 done
* py2 begin, comment everything
* 16.2.0 done
* 16.2.1 done
* 16.2.2 done
* 16.2.3 done
* 16.2.4 done
* 16.2.5 done
* 16.2.6 done
* 16.2.7 done
* cleanup, py2 done
* remove old threading stubs
* use --strict-optional
* improve Condition.wait_for
* remove type ignore
2016-08-01 14:31:57 -07:00
Alvaro Caceres
4c20cd6711
2and3/mmap.pyi : remove "type: ignore" ( #425 )
...
First was for mypy compatibility, but is no longer needed.
Second is removed by going inheriting (Iterable[bytes],
Container[bytes], Sized, Reversible[bytes]) instead of
Sequence[bytes]. Should presumably catch more errors when using __getattr__
2016-08-01 14:20:37 -07:00
Alvaro Caceres
f72afd0ad1
Update pytype blacklist ( #422 )
2016-07-29 15:45:09 -07:00
Valérian Rousset
1bd78d4aab
Improve contextlib ( #406 )
...
* remove old, new stubgen
* comment everything
* contextlib done
* use TypeVar instead of overload
* py2 done
2016-07-29 15:26:14 -07:00
Valérian Rousset
24086b2195
Finish mail ( #396 )
...
* remove old email files
* finish email.mime
* finish email.encoders
* email.utils: stubgen run, reorder
* finish email.utils
* finish email.iterators
* email.mime is a module
* fix mime
2016-07-29 15:25:52 -07:00
Max Wittek
af860ee993
textwrap for py3: fixed stubs to include 'text' param ( #420 )
2016-07-29 14:01:03 -07:00
Valérian Rousset
417230043e
add colorsys ( #419 )
...
* add colorsys
* add undocumented constants
2016-07-29 08:02:24 -07:00
Valérian Rousset
0fea15ea29
Add mmap ( #412 )
...
* py3 done
* have to have specific version, to much changes
* py2 done
* merge py2 and py3 version
* fix duplicate definition in mypy
* apply version specific def
* rename ContextManager, single line for import
2016-07-29 06:47:23 -07:00
Valérian Rousset
6c6f5f19da
apply conditionals ( #417 )
2016-07-29 05:59:26 -07:00
Valérian Rousset
cfde32b93f
Add mimetypes ( #404 )
...
* remove old mimetypes, new stubgen
* reorder, cleanup
* py3 pass (py2 pass empty)
2016-07-29 05:50:46 -07:00
johnklai1
9795200acc
Add optional delete argument to bytes.translate and bytearray.translate ( #416 )
2016-07-28 23:38:56 -07:00
Guido van Rossum
781b079f91
Add Supports{Abs,Float,Int,Round} as base classes for Decimal. ( #415 )
2016-07-28 15:13:27 -07:00
Alvaro Caceres
6701a10e93
Add 2.7/decimal.pyi generated by stubgen ( #414 )
...
* add decimaly.pyi
generated with
stubgen --py2 decimal
* Strip out private stuff
* pytype compatibility
* fixes
2016-07-28 11:09:48 -07:00
Valérian Rousset
557579da36
merge py2 and py3 errno ( #413 )
2016-07-28 06:15:22 -07:00
Alvaro Caceres
b968bfcb1c
Update pytype test blacklist ( #411 )
2016-07-27 15:43:48 -07:00
Guido van Rossum
39325bf159
Mypy now supports sys.platform and sys.version_info checks ( #410 )
2016-07-27 13:25:29 -07:00
johnklai1
112a1a17dd
Add S_IRWXG to Python 2.7's stat.pyi file. ( #409 )
...
Fixes #408 .
2016-07-27 11:29:12 -07:00
Jakub Stasiak
b91b932d4f
Add BaseRequestHandler instance attributes ( #384 )
...
From the BaseRequestHandler documentation:
handle()
This function must do all the work required to service a request.
The default implementation does nothing. Several instance attributes
are available to it; the request is available as self.request; the
client address as self.client_address; and the server instance as
self.server, in case it needs access to per-server information.
The type of self.request is different for datagram or stream
services. For stream services, self.request is a socket object;
for datagram services, self.request is a pair of string and
socket.
2016-07-26 09:57:08 -07:00
Valérian Rousset
cd413c502c
Add hmac ( #402 )
2016-07-26 08:40:04 -07:00
Michael R. Crusoe
cc735b1176
expose xml.sax Exceptions ( #280 )
2016-07-26 07:45:27 -07:00
Jakub Stasiak
44b367c7fe
Add re fullmatch() information ( #381 )
2016-07-26 07:43:29 -07:00
Fabian Heredia Montiel
918eef43f7
Add some missing classes from queue in py3 ( #401 )
2016-07-26 07:41:56 -07:00
Valérian Rousset
56760eda52
Improve iterators ( #405 )
...
Mainly reorder the stub, adding some missing method and having some other being version dependent.
I've also, in 30f395e, specialized some function, specifying it for Sequence and Mapping, which is not strictly correct (because any class having `__getitem__` should get accepted) but is way more useful that simply having Any.
2016-07-26 07:41:08 -07:00
Michael Lee
9ecc1f2147
Add stubs for NewType helper function ( #398 )
...
(Note that this is not enough to support NewType(). However it's a prerequisite for the mypy implementation.)
2016-07-26 07:35:28 -07:00
jchien14
b8c08f25f7
Add traceback.print_stack to mypy python 3 ( #400 )
2016-07-25 16:40:01 -07:00
Wojciech Kaczmarek
a93b491fed
Add Py2 BaseHTTPServer ( #397 )
...
Fixes #395
2016-07-25 16:14:02 -07:00
Alvaro Caceres
746f4db989
Change constants to type-equivalent versions ( #392 )
...
* Change constants to type-equivalent versions
For pytype support.
" = object()" -> " = ..."
Non-zero ints -> 0
* Drop changes to typing and __builtin__
2016-07-25 13:03:42 -07:00
jdelic
ba69b32d06
argparse stub fix: parse_known_args takes an optional sequence of strings like parse_args(), not an optional string ( #386 )
...
* parse_known_args takes an optional sequence of strings like parse_args, not an optional string
2016-07-22 14:39:56 -07:00
jdelic
791966a65a
argparse stub fix: allow subclasses of Action in add_argument(action=...) ( #385 )
...
The action was incorrectly typed as allowing instances of Action -- the correct type is subclasses of Action. (And str.)
2016-07-22 14:38:24 -07:00
jdelic
05cd6ec5fa
List should probably be Sequence ( #387 )
2016-07-22 13:19:49 -07:00
alvarocaceres
d7db6221da
Change imports so pytype can parse them ( #394 )
...
* Change imports so pytype can parse them
relative imports -> absolute
import foo.bar as baz -> equivalent "from foo ..."
* fixup ...
2016-07-22 13:04:09 -07:00
David Euresti
19135832bd
Fix a couple of missing and wrong types (typing, six, gettext) ( #393 )
...
* Add http_client to six.moves, add missing functions to urllib2 fix some types in gettext
* Add missing View classes to typing.pyi
2016-07-22 12:52:28 -07:00
alvarocaceres
b676e4af92
Remove non-stub code from pyis ( #391 )
...
* Remove non-stub code from pyis
Also removed @abstractmethod decorators from codecs stub
* add back @abstractmethod
2016-07-22 11:10:13 -07:00
jdelic
4f7c9ce432
argparse stub fix: values parameter of Action can also be str and None ( #388 )
...
* values can be a str, too
* values should probably use Sequence
2016-07-22 10:58:59 -07:00
alvarocaceres
f7b35bc8be
Remove line continuations to help pytype parse ( #390 )
2016-07-22 10:55:42 -07:00
Valérian Rousset
0863590721
add site ( #389 )
2016-07-22 07:38:17 -07:00
Fabian Heredia Montiel
4a408c014f
Add pytz basic typing ( #383 )
...
* Add pytz basic typing
* Add pytz.lazy basic typing
* Move the files to the correct path
* Move files to correct directory
* Ignore issue with different sig from supertype
2016-07-22 05:52:40 -07:00
alvarocaceres
e02332a787
Misc. changes to help pytype parse typeshed ( #382 )
2016-07-21 13:08:12 -07:00
Michael Lee
368c703078
Add dict views to python 2 ( #376 )
2016-07-21 11:28:35 -07:00
Fabian Heredia Montiel
d787dbe984
Add conditional floor for Python 3.x ( #380 )
2016-07-21 11:08:21 -07:00
alvarocaceres
c1b12970f6
Change empty string literals to ellipsis ( #377 )
...
For pytype compatibility
2016-07-20 10:57:32 -07:00
Fabian Heredia Montiel
1d5df0bd7b
Add enumera ( #378 )
2016-07-20 10:53:34 -07:00
Guido van Rossum
df5c64e247
Add StopAsyncIteration; also add StopIteration.value.
2016-07-19 19:45:36 -07:00