Daniel Bowtell
bb8b9bdaec
codecs.iter(en|de)code fix return type ( #1807 )
...
codecs.iterencode and codecs.iterdecode should both return Generators rather than Iterators
2018-01-02 12:49:34 -08:00
Salvo 'LtWorf' Tomaselli
c8c4a8f208
Added filelist attribute to ZipFile ( #1798 )
2018-01-02 10:18:03 -08:00
Ashwini Chaudhary
c5439668fe
Added stub for sre_compile(2and3) ( #1493 )
2017-12-14 20:52:54 -08:00
Semyon Proshev
a1e85be4c9
Add __int__ to uuid.UUID ( #1783 )
2017-12-13 08:20:47 -08:00
Neil Conway
46125886c0
argparse: Add annotations for instance variables. ( #1763 )
2017-12-12 15:10:31 -08:00
Neil Pilgrim
fc10a94db1
Distutils improvements to cmd.pyi and log.pyi ( #1748 )
...
* Add more functions to distutils.cmd.Command.
* Add detail to distutils.log, previously an empty file.
2017-11-27 15:47:04 -05:00
Tim Abbott
c1971fb443
imaplib: Fix annotation for search. ( #1762 )
...
* imaplib: Fix annotation for search.
https://docs.python.org/3/library/imaplib.html#imaplib.IMAP4.search
shows that IMAP4.search takes a number of str args, not a number of
List[str] args (I can see how one would be confused, though, because
of the *criteria).
* imaplib: Fix annotation for store.
While it's called "flag_list",
https://docs.python.org/3/library/imaplib.html#imaplib.IMAP4.store
clearly shows it's expecting a string with a list of flags in it, not
a Python list.
2017-11-25 13:23:57 -08:00
Ben Leslie
7806420105
Fix missing colon in StreamHandler.stream type annotation ( #1753 )
...
The missing colon in the variable type annotation means that the type of stream is currently incorrectly determined to be of type ellipsis, rather than IO[str].
2017-11-18 15:57:55 -08:00
Patrick Valsecchi
d62743d788
Make traceback.FrameSummary Iterable ( #1741 )
...
To make this code valid:
```python
import traceback
for filename, lineno, name, line in traceback.extract_stack(stack):
pass
```
2017-11-13 07:05:16 -08:00
Jelle Zijlstra
83ca997140
Change more defaults to ... ( #1729 )
...
* codemod ': Any = None' ': Any = ...'
* codemod ': (Union|Optional)([^=]+)\s+=\s+-?\d+' ': \1\2 = ...'
* codemod ': (Union|Optional)([^=]+)\s*=\s*-?(None|False|True)' ': \1\2 = ...'
* codemod ': (int|float|bool)\s*=\s*-?\d+' ': \1 = ...'
* codemod ': (bool)\s*=\s*(False|True)' ': \1 = ...'
* codemod ': Any\s*=\s*(False|True|None)' ': Any = ...'
2017-11-13 06:56:24 -08:00
Jelle Zijlstra
0080017d02
fill out bz2 stub ( #1728 )
...
- add a default value to ...
- add some missing version checks
- add some missing arguments
2017-11-13 06:55:43 -08:00
FichteFoll
a44de46a00
use_builtin_types is optional for plistlib.load ( #1738 )
2017-11-11 16:54:11 -08:00
Jelle Zijlstra
97be335160
don't import enum in Python 2 ( #1724 )
...
* don't import enum in Python 2
Fixes a pytype issue from #1720 .
* move enums together
2017-11-10 10:23:22 -08:00
Jelle Zijlstra
324f1761f4
Change more defaults to ... ( #1727 )
2017-11-09 10:32:17 -08:00
Josh Staiger
fd25e534ad
Add default timeout for Condition.wait_for ( #1726 )
...
Fixes:
- Too few arguments for "wait_for" of "Condition"
when timeout is not specified.
2017-11-09 10:12:33 -08:00
Jelle Zijlstra
54dd6ba27c
Change numerous default values to ... ( #1722 )
...
This is the convention, and some default values (e.g. strings) apparently
break pytype.
2017-11-09 06:28:40 -08:00
Kenny Do
26ea6c0740
pkgutils.walk_packages takes optional list of str for path ( #1725 )
2017-11-09 05:57:29 -08:00
Josh Staiger
8b367c770b
Make pkgutil.get_data return Optional[bytes] ( #1714 )
...
As per the docs (and implementation):
- https://docs.python.org/3/library/pkgutil.html#pkgutil.get_data
If the package cannot be located or loaded ... then None is returned.
2017-11-05 14:00:51 -08:00
rchen152
85e75c9a6a
Fix a parameter type in threading.Thread.__init__ ( #1706 )
2017-11-01 15:41:10 -07:00
Matěj Cepl
8ead136300
IMAPlib stub. ( #1685 )
...
Fixes #295 .
2017-10-25 16:37:04 -07:00
hashstat
c366a1be55
Merge v2 and v3 array stubs ( #1670 )
...
See #1608
2017-10-25 09:46:25 -07:00
Sally
37f1bf54a5
Fix type of source for xml.sax.parse ( #1666 )
...
Fixes https://github.com/python/typeshed/issues/1655
2017-10-25 09:45:48 -07:00
marienz
c888bc8a1a
Fix distutils.setup's cmdclass argument ( #1682 )
2017-10-22 15:47:31 -04:00
hashstat
0917560195
Add new methods to socket stubs. ( #1638 )
...
* Add new methods to socket stubs.
Also fix a couple of invalid types in recv*_into() socket methods.
* Add double-underscores to parameters for position-only arguments
2017-10-07 08:41:06 -07:00
hashstat
f48731ac7a
Add stub for standard library crypt module ( #1641 )
2017-10-04 20:39:33 -07:00
hashstat
6661377597
Ensure AF_*, SOCK_*, AI_*, and MSG_* constants use enum types ( #1637 )
2017-10-04 08:55:36 -07:00
hashstat
fc74f53c5a
Corrects timeout type annotations. ( #1639 )
...
Timeouts should be floats, but were ints for some reason.
2017-10-04 08:40:40 -07:00
hashstat
15f737d2a8
Corrects return type of warnings.formatwarning(). ( #1640 )
2017-10-04 08:37:08 -07:00
Gábor Bernát
f1a01b3017
[XML] iterparse is None for end-ns, Tuple[str, str] for start-ns, Element otherwise ( #1520 )
2017-10-04 08:24:27 -07:00
Ben Leslie
b8f7ba8e8a
Corrections to logging.StreamHandler stubs ( #1624 ) ( #1625 )
...
- Missing attribute `StreamHandler.stream`
- Missing attribute `StreamHandler.terminator`
- terminator is only available in 3.3+
2017-09-23 18:36:51 -04:00
Dominik Gabi
693509bff6
Change Union[float, None] to Optional in socket.pyi ( #1602 )
2017-09-13 13:23:54 -07:00
Robert T. McGibbon
f1a13cea9c
Add __init__ and __contains__ to argparse.Namespace ( #1578 )
2017-08-27 14:14:01 -07:00
Chris
875bfe4c2a
Allow Any return value for callbacks in retrbinary etc ( #1567 )
...
Fixes #1258
2017-08-25 20:40:45 -07:00
Guido van Rossum
76685480e0
Misc fixes found by running mypy against Dropbox internal codebase "C". ( #1575 )
2017-08-25 20:34:13 -07:00
Ashwini Chaudhary
4f14617db1
Add stub for codeop to 2and3 ( #1534 )
2017-08-11 17:09:57 -07:00
vim345
228615b307
fix the type definition of namer function ( #1498 )
2017-08-07 17:36:05 -06:00
Ashwini Chaudhary
c6bb8a7c88
Added stub for chunk(py 2 and 3) ( #1523 )
2017-08-06 08:21:09 -07:00
Matthias Kramm
3638bc1f52
Fix Python 2's traceback.format_exception, traceback.print_exception ( #1512 )
...
E.g. it's legal to call traceback.format_exception(None, None, None). In
particular, this change makes the following idiom type-check:
import traceback
import sys
exc_type, exc_value, exc_traceback = sys.exc_info()
traceback.format_exception(exc_type, exc_value, exc_traceback)
2017-08-03 15:58:34 -07:00
Luka Sterbic
34c8aa0d4c
traceback: use StackSummary where possible ( #1495 )
2017-07-26 08:27:43 -07:00
Jelle Zijlstra
74966bacd9
distutils: make Command classes non-abstract ( #1488 )
2017-07-19 20:28:16 +03:00
Jelle Zijlstra
ac651d2f8c
Fix a few TODOs ( #1487 )
...
* fix some easy TODOs
* fix io
2017-07-19 20:27:50 +03:00
Ashwini Chaudhary
11a479fd69
Add stub for formatter ( #1481 )
2017-07-18 19:19:14 -07:00
Thomas Grainger
2bb7ea9595
csv DictReader should only yield OrderedDicts in Py3.6 ( #1478 )
2017-07-14 21:58:52 -07:00
Thomas Grainger
7637549ced
fix DictReader definition ( #1475 )
...
* constructable with Iterable
* __iter__ returns another DictReader
* supports `__next__` on python 3
* supports `next` on python 2
2017-07-10 21:02:59 -07:00
Jelle Zijlstra
7ecc979211
locale: broaden type of val argument to format ( #1453 )
...
Fixes #1350
2017-07-04 19:21:12 -07:00
Jelle Zijlstra
fee2eaae30
xml.sax.saxutils: make some functions take AnyStr ( #1457 )
...
Fixes #1062
2017-07-04 19:18:43 -07:00
Jelle Zijlstra
2b97c02801
logging: make Logger inherit from Filterer ( #1448 )
...
Fixes #1401
2017-07-04 19:18:01 -07:00
Roy Williams
5a95e19322
Allow csv module to support both str and unicode types in Python 2 ( #1437 )
...
* Replace keys in DictReader with Any
2017-06-27 14:24:22 -07:00
Jelle Zijlstra
22f47fd478
add typing.AsyncContextManager and contextlib.asynccontextmanager ( #1432 )
...
Implements:
- https://github.com/python/typing/pull/438
- https://github.com/python/cpython/pull/360
Note that https://github.com/python/cpython/pull/1412 , which adds
contextlib.AbstractAsyncContextManager, has not yet been merged.
2017-06-27 10:39:40 -07:00
Harmen
d260bb4889
support for with socket.create_connection ( #1429 )
2017-06-24 09:11:12 -07:00