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
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
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
Valérian Rousset
557579da36
merge py2 and py3 errno ( #413 )
2016-07-28 06:15:22 -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
Valérian Rousset
cd413c502c
Add hmac ( #402 )
2016-07-26 08:40:04 -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
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
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
d787dbe984
Add conditional floor for Python 3.x ( #380 )
2016-07-21 11:08:21 -07:00
alvarocaceres
ac5916c170
Tweak version tests to help pytype parse them ( #374 )
2016-07-19 07:43:35 -07:00
Valérian Rousset
61f232c7d8
add py3 version to zipimport ( #305 )
2016-07-17 21:05:05 -07:00
Valérian Rousset
8ef221c162
add zipfile for py2 ( #345 )
2016-07-15 05:55:20 -07:00
Jukka Lehtosalo
e05edb60f1
Mypy stub fixes for strict optional mode ( #366 )
2016-07-13 09:38:40 -07:00
Guido van Rossum
53d126f4d4
More fixes for argparse. ( #362 )
2016-07-13 07:51:29 -07:00
Guido van Rossum
b63e09c239
Fix some issues for dateutil and argparse ( #357 )
...
* Fix stubs for 2.7/dateutil. They were pretty broken.
(The 3/dateutil share some of the brokenness but that's still a TODO.)
* Fix argparse stubs.
- Container is not strong enough for choices.
- add_subparsers() returns something with an add_parser() method.
2016-07-12 16:24:33 -07:00
tharvik
87235ad72b
merge py2 and py3 argparse
2016-07-11 15:23:51 +02:00
Valérian Rousset
3eedf73a3a
Add types to stub for warnings module. ( #342 )
2016-07-06 09:58:49 -07:00
Guido van Rossum
8ee3123e02
Fix log() signatures; change msg: str to msg: Text.
2016-06-05 17:25:56 -07:00
Guido van Rossum
d75e2ab224
Add logging.WARN; TextIO -> IO[str].
2016-06-05 17:10:15 -07:00
Valérian Rousset
a581397c42
add types to logging ( #247 )
2016-06-04 19:20:15 -07:00
Jukka Lehtosalo
292447bd62
Misc stub fixes ( #181 )
2016-05-04 16:54:57 -07:00
Michael Lee
ce59cd4056
Add missing 3.3+ and 3.5+ math functions ( #164 )
...
Python 3.3 added the `math.log2` function; Python 3.5 added
`math.gcd`, `math.inf`, `math.isclose`, and `math.nan`.
2016-04-25 21:40:40 -07:00
Jakub Stasiak
7535d41471
Add a very basic bz2 stub
2016-04-13 11:44:43 +02:00
Matthias Kramm
5f76369093
Move warnings.pyi into 2and3/.
2016-04-08 14:43:43 -07:00
Ismail
8f2e1ac885
Only define Chrome class on py2.7 or >3.2
2016-02-01 10:02:54 +00:00
Ismail
b6dfeebe1e
Move webbrowser.pyi to 2and3 folder
2016-02-01 10:00:53 +00:00
Guido van Rossum
8c2118bace
Move contents of builtins/* to stdlib/*. This simplifies finding stubs.
2016-01-12 12:53:18 -08:00