Reason: https://github.com/python/mypy/issues/328
* Revert "Make fromkeys() take an Iterable instead of a sequence. (#605)"
This reverts commit 66e8d4a14f.
* Revert "Make dict.fromkeys() a classmethod (which it is). (#604)"
This reverts commit 26dfcb6859.
* Add an explanation for fromkeys() being a staticmethod.
Add `TimeTuple = Tuple[int, int, int, int, int, int, int, int, int]`
to stdlib/3/time.pyi and stdlib/3/datetime.pyi.
Use `TimeTuple` instead of `tuple` (where relevant) in time.pyi for
stronger type checking.
Use `TimeTuple` instead of
`Tuple[int, int, int, int, int, int, int, int, int]` in datetime.pyi
to increase readability.
* Add threading._DummyThread
* Make threading.RLock a factory function, not a class
Will break code that currently uses a threading.RLock type annotation
* Add definitions added in Python 3.3
* Remove blanks between function stubs
* Group Unix-only functions into platform checks
* Correct get_clock_info() return type to SimpleNamespace
* Fixed types in stdlib/3/concurrent/futures:
- Remove private classes from public interface
- Add missing types
* Remove "generated by stubgen" headers from modified type stubs
* - Use ... as default value
- Fix space formatting
* Replace more default values with '...'
* Use 'None' as default value where specified by documentation
* Use explicit Optional[T] type instead of default value None
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`.
* Refine stubs for Python 2's decimal module
The decimal module for Python 2 was relatively incomplete, unlike the
decimal module for Python 3. This commit copies the relevant type
signatures from Python 3's decimal module to Python 2's.
There was a lot of code in both stubs and it wasn't clear to me if it
was safe to merge the two modules together, so I refrained from doing
so.
* Allow comparisions with Decimals and Floats
This commit loosens the types for Decimals to allow comparisons like
`Decimal('3.14') < 4.2`. Previously, you could compare decimals with
only other decimals or ints.
* 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.