Jelle Zijlstra
00cda79cf5
add io.TextIOWrapper.read in 3.3 ( #2248 )
...
This is needed to make TextIOWrapper and a few classes that inherit
from it concrete in 3.3. I am actually not sure whether this method
exists at runtime; there's nothing in
https://docs.python.org/3/library/io.html#io.TextIOWrapper
that suggests it was added in 3.4. In any case, it hardly matters
since 3.3 usage should be very rare now.
2018-06-17 23:47:07 +01:00
Jelle Zijlstra
3032fbdff1
make http.client.HTTPResponse concrete in 3.4 ( #2244 )
...
Matches the implementation in https://github.com/python/cpython/blob/3.4/Lib/http/client.py#L308
The ignore works around python/mypy#5027 (commented further up in the 3.5 branch).
Part of #1476 .
2018-06-17 17:29:02 +01:00
Jelle Zijlstra
da8de48f6d
UserList and UserString in 2.7 ( #2246 )
...
Fill out UserList and UserString stubs to make the classes concrete. Compare:
https://github.com/python/cpython/blob/2.7/Lib/UserList.py
https://github.com/python/cpython/blob/2.7/Lib/UserString.py
2018-06-17 17:24:30 +01:00
Jelle Zijlstra
8084dc1c1f
Fix abstract classes in 2.7 ( #2247 )
...
Part of #1476 .
2018-06-17 17:21:17 +01:00
Jelle Zijlstra
6b36b1befe
Iterator provides a concrete __iter__ in 2.7 (#2245 )
...
This is already how it works in the Python 3 stub.
`Iterator.__iter__` also exists at runtime: https://github.com/python/cpython/blob/2.7/Lib/_abcoll.py#L73 .
2018-06-17 12:00:42 +01:00
Jelle Zijlstra
0393de4bd7
fix some abstract classes in Python 2 ( #2240 )
...
Part of #1476 .
2018-06-17 00:56:00 +01:00
Jelle Zijlstra
94ab32ba59
Fix abstract classes for Python 3 ( #2239 )
...
* add metaclass=ABCMeta to some classes
* mark some more classes as explicitly abstract
* make some more classes concrete
2018-06-16 10:18:54 -07:00
Jelle Zijlstra
341fa375ef
cleanup in typing.pyi ( #2241 )
...
- Fix TODOs around TracebackType
- Don't use quotes for forward references
- Make Generator and AsyncGenerator attributes into properties
2018-06-16 08:24:52 -07:00
Jelle Zijlstra
c06a718c5b
always run mypy with --no-implicit-optional ( #2242 )
...
This was already the configuration in Travis and it's been working fine. It's
confusing that Travis was using a different configuration than the default
when you run tests/mypy_test.py yourself.
2018-06-15 21:34:14 -07:00
Jelle Zijlstra
499f852e37
add --show-traceback to mypy_test.py flags ( #2236 )
...
This makes debugging easier.
2018-06-15 16:46:59 -07:00
Jelle Zijlstra
de86f15fa0
Make http.client.HTTPResponse a BinaryIO ( #2218 )
...
Fixes #2189 .
The errors from mypy are a false positive (see python/mypy#5027 ).
2018-06-12 09:20:24 -07:00
Jelle Zijlstra
6bbf3d89eb
Further improve codecs stubs ( #2217 )
...
- remove header comments
- uppercase type aliases
- remove old-style type annotations
- unquote forward refs
- reformat the file
- remove values for globals
- don't use private names from codecs stub in io.pyi
2018-06-11 22:24:34 -07:00
Jelle Zijlstra
bdb06b5b81
improve codecs stubs ( #2114 )
...
Started out as progress towards #1476 , but I ended up fixing a few more things:
- fixed the signature of _encode_type, which actually returns a pair, not a string
- made some attributes into properties in order to prevent the descriptor protocol from turning them into methods
- found a bug in CPython in the process (python/cpython#6779 )
I used the following test file to make sure these classes are now instantiable:
```python
import codecs
import io
from typing import IO
bio = io.BytesIO()
cod = codecs.lookup('utf-8')
codecs.StreamReaderWriter(bio, codecs.StreamReader, codecs.StreamWriter)
codecs.StreamRecoder(bio, cod.encode, cod.decode, codecs.StreamReader, codecs.StreamWriter)
```
2018-06-11 15:53:15 -07:00
Jelle Zijlstra
d2469c0e89
fix type for itertools.product ( #2129 )
...
Fixes #1850 .
The fix was already applied to Python 2, but the typevar-based solution there
leads to "cannot infer value of type variable" in mypy. I used the following
script to check:
```python
from itertools import product
reveal_type(product([1]))
reveal_type(product([1], ['x'], [False], [3.0], [(1,)], [('x',)], [{1}], [{1: 2}], repeat=5))
```
2018-06-11 15:52:44 -07:00
Jelle Zijlstra
ced5d61bb6
make urllib.response.addinfourl instantiable ( #2134 )
...
Fixes #1377 (because HTTPError is a subclass of addinfourl). Also part of #1476 .
2018-06-11 15:43:53 -07:00
Jelle Zijlstra
4e6af84640
improve multiprocessing.Pool types ( #2126 )
...
Fixes #1703
Mostly introduce typevars to express that the return types match the return types of the
callbacks.
Removed comment about incompleteness since all documented classes from
https://docs.python.org/3/library/multiprocessing.html#module-multiprocessing.pool
are covered.
2018-06-11 14:42:57 -07:00
Jelle Zijlstra
82c930e66c
Improve asyncio.tasks stubs ( #2139 )
...
- Use PEP 526-style variable annotations where possible
- Use FrameType instead of Any
- Remove workaround for mypy issue that was since fixed
2018-06-11 14:40:54 -07:00
Jelle Zijlstra
f5a74fd5da
remove Optional from type of __slots__ ( #2128 )
...
Fixes #1853
2018-06-11 14:29:11 -07:00
Jelle Zijlstra
f65caed181
allow socket.recv_into to take a memoryview ( #2127 )
...
Fixes #1862
2018-06-11 14:25:11 -07:00
Jelle Zijlstra
cb293ebd2e
switch order of base classes on awaitable classes ( #2125 )
...
Fixes #1940 .
This makes it so that mypy will infer the common base class of these
classes to be Awaitable instead of Iterable. I verified that this
fixes the errors in the script posted by @neilconway.
2018-06-11 14:20:31 -07:00
Jelle Zijlstra
7abcd0f71f
add ConfigParser.readfp in Python 3 ( #2123 )
...
https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.readfp
Fixes #2112
2018-06-11 14:10:52 -07:00
Jelle Zijlstra
53fde2ddf7
make timeout argument to Connection.poll Optional ( #2122 )
...
Fixes #2094
2018-06-11 14:04:45 -07:00
Jelle Zijlstra
91af6291b1
make shlex.shlex and multiprocessing.pool.IMapIterator instantiable ( #2120 )
...
Part of #1476 .
2018-06-11 14:04:05 -07:00
Jelle Zijlstra
c5bc3bd7fa
make contextvars.Context instantiable ( #2119 )
...
Part of #1476 .
2018-06-11 14:03:02 -07:00
Jelle Zijlstra
f789ee25ad
make EnumMeta instantiable ( #2118 )
...
part of #1476 . Verified that len(Enum) is still allowed by mypy.
2018-06-11 14:02:16 -07:00
Jelle Zijlstra
f73351f5bf
make tracemalloc.Traceback instantiable ( #2117 )
2018-06-11 14:01:46 -07:00
Jelle Zijlstra
28f6c095d4
make http.cookies.{Base,Simple}Cookie instantiable ( #2116 )
...
Part of #1476 .
2018-06-11 14:01:17 -07:00
Jelle Zijlstra
a33a124537
make BZ2File and LZMAFile instantiable ( #2115 )
...
Part of #1476 .
2018-06-11 13:59:38 -07:00
Jelle Zijlstra
764ee4eeec
add pytz.ZERO and pytz.HOUR ( #2180 )
...
https://github.com/stub42/pytz/blob/master/src/pytz/__init__.py#L187
2018-06-11 11:27:34 -07:00
Jelle Zijlstra
38fb53eab6
add __init__ to SimpleNamespace ( #2207 )
...
```In [11]: SimpleNamespace(x=3)
Out[11]: namespace(x=3)
```
2018-06-11 08:08:41 -07:00
Jelle Zijlstra
cd4a5ff65c
use pytype-single rather than pytype ( #2198 )
...
Looks like this happened in https://github.com/google/pytype/commit/3de774361b2481b55ef493391429e88571f7b9f2 .
2018-06-05 08:34:21 -07:00
Jelle Zijlstra
eef0b1d562
fix type for TestCase.assertIn ( #2186 )
...
* fix type for TestCase.assertIn
This does essentially `assert member in container`, so we want a `Container`, not an `Iterable`.
This came up in https://github.com/ambv/black/pull/288/files/68e9d426a86edc187a3f58ea889a2002620f0de6..0bbee43d60dfc16d8bbdd0bbdaad754a2c8c7ec0#r192525658 .
* use any for assertIn
2018-06-04 15:34:09 -07:00
Jelle Zijlstra
da7b04904c
Limit lines to 130 chracters ( #2169 )
...
Fixes #2124 .
As mentioned in the issue, the current guidelines lead to extremely long lines of many hundreds of characters, which make code hard to read and review. I think there should be some limit to line length, but it's OK for stubs to have somewhat longer lines than normal code.
For reference, there are currently 115 lines in typeshed over 200 characters; 523 over 120 characters; and 2980 over 79 characters.
We picked 130 because that's the longest line GitHub displays on a 13" laptop in a unified diff without folding. There are currently 382 lines in typeshed that are over 130 characters.
2018-05-29 08:28:08 -07:00
Jelle Zijlstra
b89f9553e9
keep os.path in 2 and 3 consistent ( #2152 )
...
We can't merge these because os/__init__ is still different.
Also slight refactor of tests/check_consistent.py to avoid `from os import path`.
2018-05-22 07:14:13 -07:00
Jelle Zijlstra
537b97ed39
add bytearray.copy to Python 3 ( #2133 )
...
Fixes #1715 .
2.7's bytearray doesn't have it.
2018-05-15 14:33:24 -04:00
Jelle Zijlstra
55be42f6d6
add __fspath__ support to os.path ( #2053 )
...
Fixes #1997 , #2068 .
This is tricky because we need to get the return values right (see #1960 for
prior attempts) and we often run into python/mypy#3644 . I found that I
could express most signatures correctly using a series of overloads.
A few other changes in here:
- Added splitunc, which according to https://docs.python.org/3/library/os.path.html
should exist in both Unix and Windows.
- Made the second argument to os.path.curdir Optional to match the implementation.
- Fixed os.path.split, whose previous Path-aware signature triggered python/mypy#3644 .
2018-05-15 10:31:40 -04:00
Jelle Zijlstra
463b4144dc
explicitly import boto.regioninfo ( #2121 )
...
This may be causing intermittent test failures (see discussion on gitter).
2018-05-15 10:09:44 -04:00
Jelle Zijlstra
fc9a822348
specify what type Binary is ( #2057 )
...
Fixes python/mypy#4916 .
2018-04-27 14:40:33 -07:00
Jelle Zijlstra
46f0bb8b91
support unicode in Python 2 for difflib ( #2055 )
...
Fixes #1961 .
I mostly just replaced all str annotations with Text, including in return types. This is
only broadly correct; diffing a str and a unicode sequence actually results in a mixed
output of str and unicode. We could also keep the return types as str if using Text
causes errors in real code. For callbacks that take str, I introduced a Union alias
because a callable taking a str would not be a compatible with a parameter of type
Callable[[Text], bool].
I also fixed the return type of difflib.restore.
2018-04-27 14:39:18 -07:00
Jelle Zijlstra
f60ffe47a2
add attributes to locale ( #2056 )
...
Fixes #1888 .
2018-04-27 14:38:22 -07:00
Jelle Zijlstra
c7e3e9890d
add UserDict.__init__ for Python 3 ( #2083 )
...
Fixes #2075
2018-04-27 14:38:00 -07:00
Jelle Zijlstra
9e25506cab
add missing attributes to Python 2 unicode errors ( #2084 )
2018-04-27 14:37:20 -07:00
Jelle Zijlstra
5554b0b19b
argparse.ArgumentParser.error never returns ( #2082 )
...
And neither does `.exit`.
Fixes #2081 .
2018-04-25 21:30:31 -07:00
Jelle Zijlstra
a5429d25dc
add missing methods to DictMixin ( #2054 )
...
Fixes #1896 .
2018-04-14 14:21:07 -07:00
Jelle Zijlstra
b1a0b8ad6e
add subprocess.STARTUPINFO and some associated constants ( #2041 )
2018-04-12 12:29:42 -07:00
Jelle Zijlstra
0f425db197
fix types for unittest.TestLoader.loadTestsFrom* methods ( #2042 )
...
Fixes #2008 .
2018-04-12 12:29:32 -07:00
Jelle Zijlstra
37aba00fe8
fix using ZipFile as a ContextManager ( #2043 )
2018-04-12 12:29:22 -07:00
Jelle Zijlstra
b8b78886e3
add some Optionals to traceback.pyi ( #2044 )
...
Fixes #1974
2018-04-12 12:29:07 -07:00
Jelle Zijlstra
840f34147e
add a lot more distutils.errors ( #2045 )
...
Fixes #1963 .
See https://github.com/python/cpython/blob/2.7/Lib/distutils/errors.py and https://github.com/python/cpython/blob/3.7/Lib/distutils/errors.py .
2018-04-12 12:28:55 -07:00
Jelle Zijlstra
7cd2016931
add sys.base_exec_prefix and sys.base_prefix ( #2047 )
...
See https://docs.python.org/3/library/sys.html#sys.base_exec_prefix .
Required for https://github.com/python/mypy/pull/4888
2018-04-11 13:59:44 -07:00
Jelle Zijlstra
db989427cb
dest argument to add_argument is Optional ( #2040 )
...
argparse.py checks for None in _get_optional_kwargs.
2018-04-10 21:47:30 -07:00
Jelle Zijlstra
bdea1bb292
fix third_party/2/enum.pyi ( #2039 )
...
This fixes an error in Travis that seems to have been caused by python/mypy#4319 .
The fix was taken from the stdlib/3.4/enum.pyi stub. Mypy no longer assumes
that classes whose metaclass is EnumMeta are subclasses of Enum, so we can't
bound the typevar on Enum.
2018-04-10 21:34:59 -07:00
Jelle Zijlstra
81a6ea43a5
try using --no-site-packages ( #2036 )
...
Fixes #2035 .
2018-04-09 12:55:18 -07:00
Jelle Zijlstra
f37709f9c3
Merge stubs for sqlite3 ( #2026 )
...
As promised in #2014 .
There are virtually no real changes between Python 2 and 3 in this module, but the stub had accumulated some meaningless differences. I also fixed a few incorrect types.
2018-04-09 12:32:59 -07:00
Jelle Zijlstra
3f456e335e
add multiprocessing.Process.kill and close ( #2027 )
...
See https://docs.python.org/3.7/library/multiprocessing.html#multiprocessing.Process.kill .
Fixes #2022 .
2018-04-09 12:04:14 -07:00
Jelle Zijlstra
d43eac60dd
add email.parser.FeedParser ( #2028 )
...
Fixes #1985 .
2018-04-09 12:03:43 -07:00
Jelle Zijlstra
6862434eae
fix return type for itsdangerous.Signer.unsign ( #2029 )
...
Fixes #2011
Also fixed the argument type (it doesn't accept str).
2018-04-09 12:00:41 -07:00
Jelle Zijlstra
8482b1030b
fill out stubs for requests.structures ( #1897 )
...
Looked at https://github.com/requests/requests/blob/master/requests/structures.py .
The "data" argument to the CaseInsensitiveDict constructor is passed as is to .update(),
so I accept the same argument types as MutableMapping.update.
LookupDict is strangely named and implemented but the point seems to be that you
setattr its keys, and then can access them with both attribute access and subscripting.
See its usage in https://github.com/requests/requests/blob/d1fb1a29ab949223d8d64797e0fcc9a7d2690483/requests/status_codes.py#L102 .
2018-04-06 11:36:43 -07:00
Jelle Zijlstra
482f207b3c
os.fwalk supports bytes ( #2013 )
...
python/cpython@8f6b344 and https://bugs.python.org/issue28682 .
I could not use the _PathLike alias because that includes bytes.
Part of #1965 .
2018-04-06 11:22:15 -07:00
Jelle Zijlstra
d24799fd31
uncomment a few parts of six.moves ( #2019 )
2018-04-06 11:20:14 -07:00
Jelle Zijlstra
4ab720161a
ResourceWarning doesn't exist in Python 2 ( #2020 )
...
Fixes #1971 .
2018-04-06 11:19:34 -07:00
Jelle Zijlstra
54ecefef04
removals in Python 3.7 ( #2018 )
...
Last part of #1965 .
2018-04-06 11:11:29 -07:00
Jelle Zijlstra
0acdfd1548
more 3.7 features ( #2017 )
2018-04-06 11:09:45 -07:00
Jelle Zijlstra
7cfbc7d17f
more 3.7 features ( #2015 )
2018-04-06 11:09:11 -07:00
Jelle Zijlstra
ce0656a8c7
add some more Python 3.7 features ( #2014 )
2018-04-06 11:08:30 -07:00
Jelle Zijlstra
0af84cd9a0
upgrade flake8, pin flake8-pyi version ( #2001 )
...
I'd prefer to pin the exact flake8-pyi version so that test runs are more reproducible.
2018-04-03 07:16:34 -07:00
Jelle Zijlstra
43e6c3c435
add more minor 3.7 new features ( #2000 )
...
part of #1965
2018-03-28 21:28:27 -07:00
Jelle Zijlstra
26e573ba1c
change default value to ... in inspect.pyi ( #1998 )
...
This is in our style guide. This is the last piece of offending code; I just submitted ambv/flake8-pyi#10 to enforce the rule in the linter in the future.
2018-03-28 20:24:39 -07:00
Jelle Zijlstra
5201ccdfff
add E741 to ignored flake8 codes ( #1999 )
...
This was introduced in a recent version (so it doesn't affect us right now but will if we upgrade the flake8 version used in tests). It gives errors like:
```
/home/travis/build/ambv/flake8-pyi/.tox/typeshed/tmp/typeshed/stdlib/3/re.pyi:21:9: E741 ambiguous variable name 'I'
/home/travis/build/ambv/flake8-pyi/.tox/typeshed/tmp/typeshed/stdlib/3/re.pyi:39:5: E741 ambiguous variable name 'I'
/home/travis/build/ambv/flake8-pyi/.tox/typeshed/tmp/typeshed/stdlib/3/re.pyi:58:5: E741 ambiguous variable name 'I'
/home/travis/build/ambv/flake8-pyi/.tox/typeshed/tmp/typeshed/third_party/2/OpenSSL/crypto.pyi:43:5: E741 ambiguous variable name 'O'
```
These aren't useful for typeshed, because regardless of whether it's good style, these libraries really do contain variables named `I` and `O`.
2018-03-28 20:24:24 -07:00
Jelle Zijlstra
371b805c23
improve selenium stubs ( #1732 )
2018-03-28 19:39:43 -07:00
Jelle Zijlstra
0c15e5bdcc
Improve werkzeug stubs ( #1730 )
2018-03-28 19:38:35 -07:00
Jelle Zijlstra
200273edeb
add stub for importlib.resources ( #1993 )
...
Part of #1965
2018-03-28 18:44:40 -07:00
Jelle Zijlstra
103056eecf
fix some TODOs ( #1994 )
...
- Made deque.maxlen read-only
- We don't support 3.2, so we don't care about signature changes in it
- There don't seem to be any missing set operations (I compared the dir() of this class to that of builtins.set)
2018-03-28 18:40:13 -07:00
Jelle Zijlstra
bbbffb5f4b
implement some minor 3.7 features ( #1966 )
...
References:
- https://docs.python.org/dev/library/datetime.html#datetime.datetime.fromisoformat
- https://docs.python.org/dev/library/crypt.html#crypt.mksalt
- https://docs.python.org/dev/library/contextlib.html#contextlib.AbstractAsyncContextManager
- https://docs.python.org/dev/library/calendar.html#calendar.HTMLCalendar.cssclasses
- https://docs.python.org/dev/library/binascii.html#binascii.b2a_uu
Part of #1965 .
2018-03-22 08:01:09 -07:00
Jelle Zijlstra
b9c5e811df
allow instantiating TracebackType in 3.7 ( #1967 )
...
See https://docs.python.org/dev/reference/datamodel.html#traceback-objects
and python/cpython#4793.
part of #1965
2018-03-21 15:26:23 -07:00
Jelle Zijlstra
bfe0b06953
add stub for contextvars.pyi ( #1968 )
...
Part of #1965 .
2018-03-21 15:16:14 -07:00
Jelle Zijlstra
35d3effe03
Remove version check for deque.insert and deque.index ( #1916 )
...
Otherwise, deque is not instantiable in Python 3.4. We could do a dynamic base class instead
but that doesn't seem worth it.
2018-02-24 11:12:56 -08:00
Jelle Zijlstra
ab72267669
also test 3.7 with mypy ( #1917 )
2018-02-24 09:56:35 -08:00
Jelle Zijlstra
fe4bea39a2
fix return type of linecache.getlines ( #1877 )
...
Randomly noticed this looking at the stub. Here is the code: https://github.com/python/cpython/blob/3.7/Lib/linecache.py#L37 .
2018-02-13 16:19:44 -08:00
Jelle Zijlstra
2dd85c3658
move os.stat_result into posix stub ( #1818 )
...
This removes the circular dependency between the os and posix stub, which
is somehow triggering python/mypy#4442 . We should ideally fix the mypy bug,
but since it's easy enough to fix the import cycle, we might as well do that
too.
2018-01-09 13:50:56 -08:00
Jelle Zijlstra
fb2c7b34e2
Improve itsdangerous stubs ( #1733 )
2018-01-02 12:50:22 -08:00
Jelle Zijlstra
4ee508a032
make os.scandir work as a context manager ( #1787 )
...
Rework of #1583 . Fixes #1573 .
See documentation in https://docs.python.org/3/library/os.html#os.scandir .
2018-01-02 10:17:38 -08:00
Jelle Zijlstra
6509eee80e
add util.pyi to blacklist ( #1800 )
2017-12-23 11:23:49 -08:00
Jelle Zijlstra
0eb7083f0e
move dateutil into 2and3 ( #1743 )
...
These stubs are identical since #1735 .
2017-12-23 06:38:55 -08:00
Jelle Zijlstra
533a05be45
Fix some of the last default values that are not ... ( #1731 )
...
* still one left in atomicwrites that I need to investigate further
* fix atomicwrites
2017-11-13 07:08:30 -08:00
Jelle Zijlstra
69bffd154a
Fix default values in click stubs to ... ( #1734 )
2017-11-13 07:07:20 -08:00
Jelle Zijlstra
8e75701eda
make Python 2 and 3 dateutil stubs identical ( #1735 )
...
So that they can be merged into 2and3. This PR also adds a few missing
elements to parser.pyi and corrects some mistakes in the Python 3 stub.
Refer to https://github.com/dateutil/dateutil/tree/master/dateutil
2017-11-13 07:06:34 -08:00
Jelle Zijlstra
84d0cbf776
move thrift to 2and3 ( #1736 )
...
thrift supports Python 3 as of version 0.10.0. These stubs are pure stubgen and
might not be much good, but they belong in 2and3.
2017-11-13 07:05:57 -08:00
Jelle Zijlstra
bcfd3bf554
Fill out croniter stubs and move to 2and3 ( #1737 )
...
* fill out croniter stub
* move to 2and3
2017-11-13 07:05:38 -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
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
9390a49600
complete multiprocessing.connection stub ( #1716 )
...
Adds additional public members based on https://github.com/python/cpython/blob/master/Lib/multiprocessing/connection.py#L10 and https://docs.python.org/3/library/multiprocessing.html#multiprocessing-listeners-clients .
I found some discrepancies in the docs while adding these stubs and filed python/cpython#4304 to address them.
2017-11-09 10:40:49 -08:00
Jelle Zijlstra
324f1761f4
Change more defaults to ... ( #1727 )
2017-11-09 10:32:17 -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
Jelle Zijlstra
eaf8972e48
complete Python 3 gzip stub ( #1723 )
...
* complete python 3 gzip stub
* IOBase.closed is read-only
2017-11-09 05:56:55 -08:00
Jelle Zijlstra
735abe68dd
remove all lxml stubs for now ( #1664 )
...
Fixes #525 .
2017-11-07 07:54:01 -08:00
Jelle Zijlstra
c10dc67ad2
Re-export names in dateutil.tz ( #1669 )
...
Fixes #1665 .
2017-10-12 17:57:12 -07:00
Jelle Zijlstra
b54a711778
Recommend against creating incomplete stubs ( #1659 )
...
I disagree with the recommendation that users create incomplete stubs, because such stubs lead to false positive type checker errors (see for example #525 ). I would like to instead set a norm that all stubs should contain all public objects in the library they cover.
2017-10-10 08:27:47 -07:00
Jelle Zijlstra
78587dc895
Revert "make __class__ refer to the current object's class ( #1549 )" ( #1632 )
...
This reverts commit 1a164b630c .
Reverts python/typeshed#1549 .
See Guido's comments in the original PR.
2017-09-29 11:37:54 -07:00