15 Commits

Author SHA1 Message Date
Shantanu
6ff5b88ca7 typeshed: remove crufty comments (#4699)
Co-authored-by: hauntsaninja <>
2020-10-23 09:40:06 +02:00
Shantanu
b0f4900c9f fractions: make Fraction satisfy SupportsRound (#4697)
Helps with https://github.com/python/mypy/issues/9628

Co-authored-by: hauntsaninja <>
2020-10-22 12:12:27 -07:00
Eric Traut
002a444dff Added missing type annotations for fractions and numbers modules. (#4401)
Co-authored-by: Eric Traut <erictr@microsoft.com>
2020-08-15 18:28:14 -07:00
Eric Traut
04c74640f0 Removed imported symbols that are not accessed or re-exported (#4387)
Co-authored-by: Eric Traut <erictr@microsoft.com>
2020-08-05 22:49:17 -07:00
Jelle Zijlstra
5d553c9584 apply black and isort (#4287)
* apply black and isort

* move some type ignores
2020-06-28 13:31:00 -07:00
Shantanu
6aee098401 fractions: use __new__ instead of __init__ (#4077)
Tested against some example code.
2020-05-25 15:29:28 -07:00
Shantanu
bedccc7497 fractions: remove gcd in py39 (#4012)
Co-authored-by: hauntsaninja <>
2020-05-16 16:57:19 -07:00
Sebastian Rittau
8a7d61741d Python3.8 additions and changes (#3337)
* Add as_integer_ratio() to a few types

* Add dirs_exist_ok to copytree()

* int, float, complex accept __index__ args

Also fix complex.__init__ argument names

* Add __reversed__ to dict et al.

* Python 3.8 date(time) arithmetic fixes

* Add CodeType.replace()
2019-10-10 20:51:27 -07:00
Sebastian Rittau
cd75801aa5 Replace non-ellipsis default arguments (#2550) 2018-11-20 07:35:06 -08:00
Yusuke Miyazaki
6192cce9d9 Avoid using string literals in type annotations (#2294) 2018-07-02 20:23:29 -07:00
David Euresti
8ecb74012a Add __divmod__ to numeric types (#1900)
Helps with #1889
2018-02-18 16:59:12 -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
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
11350ed8cc Fix missing argument types in py3 stdlib (#995)
Still missing a few in _subprocess (a Windows-only private module) and decimal
(I gave up).
2017-03-14 11:43:42 -07:00
Michael Lee
ec2b9ce97e Add partial stubs for fractions (#544)
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`.
2016-09-14 16:40:17 -07:00