* Add threading._DummyThread
* Make threading.RLock a factory function, not a class
Will break code that currently uses a threading.RLock type annotation
This commit adds some incomplete stubs for the fractions module. In
particular, this commit does not add type signatures for the more
complex functions (such as `__add__`), and just leaves their types as
effectively `Any`.
* Partially refine numbers.pyi
This commit refines numbers.pyi. More specifically, it...
- Adds in explicit type annotations where it's obvious how to do
so (leaving more non-obvious type signatures alone).
- Adds in missing '@abstractmethod' decorators
- Combines together the Python 2 and Python 3 versions of numbers.pyi.
* Merges Python 2 and Python 3 numbers.pyi
This commit removes the old `stdlib/2.7/numbers.pyi` file and moves the
previously-committed `stdlib/3/numbers.pyi` to the shared `2and3`
directory.
* Modify comment at top of numbers.pyi
Since the stubs are no longer identical to what stubgen creates, the
comment should also probably be changed.
* Stub: asyncore.pyi
I can't really test this stub since I don't use this module. I believe it's not far from the real thing.
It's based on the source code and not on the documentation.
https://hg.python.org/cpython/file/default/Lib/asyncore.py
* Option ->Optional
* add hint to count, remove addr
* make read/write explicit functions
* add synchat.pyi, move to 2and3
* change sys.version_info test
* try reversing the syntax
Adds several attributes which were missing from the Logger types,
including "name", "level", and "parent". Because the type of "parent"
is a union of Logger and PlaceHolder, we also define types for
PlaceHolder and all of it's methods.
* util done
* __init__, 16.16.2.2 done
* 16.16.2.3 done
* 16.16.2.4
* fix *FUNCTYPE, fix generic
* remove part of generic
* temporarly broad some type
* 16.16.2.5
* 16.16.2.6
* 16.16.2.7
* 16.16.2.8
* 16.16.2.9 and cleanup
* no documentation on wintypes
* move from _SimpleCData to _CData
* base on some example
* py2 done, cleanup
* make pytype happy
To be on the conservative side I'm making it an Iterable of values;
this should be good enough for common usages.
The types of the values actually correspond to the types of the
argument ContextManagers, but a proper signature would require
variadic type variables (https://github.com/python/typing/issues/193),
which isn't worth waiting for. :-)
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__
* 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
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.