Lukasz Langa
fe0e3744cc
Fixing flake8 E261 errors
2016-12-19 22:09:35 -08:00
Lukasz Langa
b84f20a011
Fixing flake8 W errors
2016-12-19 21:52:56 -08:00
TrueBrain
7e89fc0d49
Define __slots__ for object as Iterable[str] / Iterable[Union[str, unicode]] ( #780 )
...
* Define __slots__ for object as Iterable[str] / Iterable[Union[str, unicode]]
* A string as __slots__ value is also valid and represents a single item
2016-12-19 13:09:04 -08:00
David Fisher
beb9183103
Swap order of overloads to fix filter without strict optional ( #779 )
...
Related to python/mypy#2587
2016-12-16 15:57:04 -08:00
David Fisher
957307b785
Make filter work properly with Optional elements ( #775 )
2016-12-15 17:53:38 -08:00
Henri Dwyer
6887edebda
add calendar data attributes ( #751 )
2016-12-13 14:58:26 -08:00
Guido van Rossum
b46280ec78
Make FrozenSet covariant. ( #769 )
...
Follow-up for PR #726 .
2016-12-13 11:40:18 -08:00
Daisuke Miyakawa
57aa1923d5
Make sqlite3's Connection.rollback() return None ( #758 )
...
Fixes #747 .
2016-12-07 16:22:47 -08:00
George King
af5b5c83fd
Make shutil.copytree stub's ignore parameter optional. ( #740 )
...
* Make `shutil.copytree` stub's `ignore` parameter optional.
* python2.7 shutil.copytree `ignore` annotated as optional.
2016-12-07 14:47:34 -08:00
George King
dccc29bc2f
Add None to type union for subprocess.Popen.communicate input. ( #743 )
...
* Add `None` to type union for `subprocess.Popen.communicate` stub's `input` parameter.
* subprocess.communicate `input` annotated as `Optional[AnyStr]` for both 2.7 and 3.x; `timeout` as `Optional[float]`.
2016-12-07 14:46:34 -08:00
Jukka Lehtosalo
f39f9bf694
Make object_hook of json.load and json.loads optional (Python 2) ( #757 )
2016-12-07 13:32:56 -08:00
Matthias Kramm
79061f9de2
move simplejson from stdlib/ to third_party/ ( #752 )
2016-12-06 17:43:47 -08:00
Onno Kortmann
69ea0ad43f
Iteration and fetch* fixes to the sqlite3.Cursor type ( #663 )
...
- Cursor is an Iterator of Any now, and .__iter__(..) and .__next__(..)
have been changed / made explicit to reflect this.
- .fetchall(..)/.fetchmany(..)/.fetchone(..) return (lists of) Anys
instead of tuples.
As per discussion in PR #663 , the output of fetching values from the
cursor can be customized with a custom assignment to
.row_factory. Therefore the correct return type for fetching is Any and
not tuple.
2016-12-06 08:17:21 -08:00
Calen Pennington
5ba7abc559
Add GenericMeta (so that classes can be Generic when they already hav… ( #703 )
2016-12-02 12:09:59 -08:00
Josiah Boning
c9ad4b8dc0
Have frozenset inherit from FrozenSet ( #726 )
...
Fixes python/mypy#2514
2016-11-30 17:58:11 -08:00
Roy Williams
33b81b9e2b
Add MutableSet to collections ( #691 )
2016-11-24 11:39:00 +00:00
Jelle Zijlstra
b10125cd7d
commands: add python 2 pyi file ( #698 )
...
Partially fixes issue #531
2016-11-23 12:14:03 +00:00
Jelle Zijlstra
7ac78b163d
Remove BaseException.with_traceback in py2 ( #697 )
...
This method doesn't exist in Python 2; it was added in Python 3. See https://docs.python.org/2/library/exceptions.html#exceptions.BaseException versus https://docs.python.org/3/library/exceptions.html#BaseException.with_traceback .
2016-11-23 11:42:59 +00:00
Jelle Zijlstra
9bc07e7b9d
fix typo in list.__delslice__ ( #696 )
2016-11-23 11:41:33 +00:00
Onno Kortmann
c4125739e5
The timeout argument to Queue.{get,put} may be None ( #682 )
...
Python 2 and 3.
2016-11-11 10:29:52 -08:00
Onno Kortmann
2d19599b68
python2: gmtime(None), localtime(None), and ctime(None) works ( #662 )
2016-11-11 09:33:50 -08:00
Roy Williams
f7f9c956ff
Add stubs for cookielib to 2.
...
(Extracted from PR #530.))
2016-11-08 19:39:27 -08:00
TrueBrain
341c4edc37
Args is a predefined attribute on BaseException, and always Tuple[Any, ...] ( #666 )
2016-11-05 16:33:58 -07:00
TrueBrain
cecb64b59f
In TextIO, 'errors' is Optional ( #665 )
2016-11-05 15:02:35 -07:00
onnokort
cd1ef9149b
Queue.get(...) takes optional float ( #661 )
2016-11-05 10:43:52 -07:00
Elazar Gershuni
59f86e1b6a
fix self type for stdlib/2 ( #645 )
2016-10-30 14:51:52 -07:00
TrueBrain
15ec66cdd6
Consider __doc__ always Optional. ( #641 )
...
python/mypy#2380 showed a discrepancy between object and FunctionType in stdlib2. The first defined __doc__ to be str, the second Optional[str]. As FunctionType depends on object, this is no longer valid.
As suggested by @gvanrossum in python/mypy#2380 , all __doc__ should be considered Optional.
(Final verdict was just to remove most __doc__ attributes since it's inherited from object.)
2016-10-30 11:48:23 -07:00
Elazar Gershuni
7a623f2cea
Dedicated TypeVar for type.__subclasses__ ( #639 )
2016-10-30 10:29:51 -07:00
Guido van Rossum
c3ddd3c5f2
Improve __subclasses__() signature. Fixes python/mypy#2236 .
2016-10-27 17:31:03 -07:00
Guido van Rossum
cb97bb54c0
Move 2.7 to 2 ( #635 )
...
Closes #579 .
2016-10-26 16:24:49 -07:00