Ivan Levkivskyi
508f992730
Add __eq__ to protobuf containers ( #3126 )
...
See https://github.com/protocolbuffers/protobuf/blob/master/python/google/protobuf/internal/containers.py .
Without these `mypy --strict-equality` causes false positives with protobufs.
2019-07-17 23:25:22 +01:00
Ivan Levkivskyi
01c2fa5a14
Sync recent typing and typing_extensions updates ( #3070 )
...
This includes two things to sync up with recent runtime updates:
* Move `Final`, `@final`, `Literal`, and `TypedDict` to `typing` (`typing_extensions` still defines or re-exports them)
* Rename `@typing.runtime` to `@typing.runtime_checkable`, while keeping `@runtime` as a backwards-compatible alias in `typing_extensions`.
2019-06-18 02:31:54 +01:00
Ivan Levkivskyi
5327484176
Use type annotation syntax ( #3048 )
2019-06-10 20:20:59 -07:00
Ivan Levkivskyi
61eb99664b
Add new semantic analyzer to mypy tests ( #3037 )
...
This also removes two redundant definitions in curses/__init__.pyi star-imported from _curses.
2019-06-07 16:49:57 +01:00
Ivan Levkivskyi
50d98acc76
Remove redundant variable definitions in ast module ( #2986 )
2019-05-13 19:32:24 +02:00
Ivan Levkivskyi
75723e3885
Add an optional opener parameter to open() function ( #2977 )
...
Fixes #2976
2019-05-09 16:59:32 +02:00
Ivan Levkivskyi
d61635e243
Add TypedDict to typing_extensions ( #2940 )
...
Since there is a PEP for `TypedDict` (PEP 589), it is being added to `typing_extension`, see https://github.com/python/typing/pull/628 . This PR essentially copies the definition from `mypy_extensions`.
Corresponding mypy PR https://github.com/python/mypy/pull/6744 can be merged independently of this PR.
2019-05-07 14:45:45 -04:00
Ivan Levkivskyi
3d638b0677
Revert "Fixing signature for Mapping.get's default parameter ( #2810 )" ( #2817 )
...
This reverts commit 3f83195558 .
2019-02-27 18:09:46 +00:00
Ivan Levkivskyi
0b8e32269a
Fix named tuple name in posix.pyi ( #2800 )
2019-02-15 17:39:27 -08:00
Ivan Levkivskyi
ca62cecd14
Fix Flask.config annotation ( #2787 )
2019-02-11 14:19:42 +01:00
Ivan Levkivskyi
9ffa1d8237
Update stubgen link and add a bit more info ( #2779 )
2019-02-03 14:47:34 +00:00
Ivan Levkivskyi
75e13a0f36
Add Final to typing_extensions ( #2453 )
2018-09-13 15:07:42 +01:00
Ivan Levkivskyi
8ed0159445
Remove duplicate method definitions in importlib and jinja2 ( #2427 )
2018-09-04 07:50:47 -07:00
Ivan Levkivskyi
126b3e17fd
Revert #2347 ( #2377 )
2018-08-09 13:22:12 -07:00
Ivan Levkivskyi
7dd4d0882d
Update return type of dataclasses.field ( #2197 )
2018-06-05 16:57:20 +01:00
Ivan Levkivskyi
7ae2f25216
Fix some problems introduced by recent commits. ( #1905 )
2018-02-20 13:34:48 -08:00
Ivan Levkivskyi
c2fa0a153a
Minor improvements to simplejson stubs ( #1832 )
...
This fixes signatures of `load` and `loads` and cleans-up
`JSONDecodeError`.
2018-01-19 22:42:31 +00:00
Ivan Levkivskyi
ec2cb8e44f
Convert selected ABCs to Protocols ( #1220 )
2017-11-19 08:52:16 -08:00
Ivan Levkivskyi
42e2142f28
Add Protocol and runtime to typing_extensions ( #1564 )
...
* Add Protocol and runtime to typing_extensions
* Use private type variable
* Fix typo
* Bound type variable for runtime to only class objects
* Conform to version check specification
2017-08-21 13:22:48 -07:00
Ivan Levkivskyi
d75ea88da5
Use 'as name' patter to re-export names from stubs (PEP 484) ( #1484 )
2017-07-14 21:31:53 -07:00
Ivan Levkivskyi
97737ce8c2
Add collections import in typing for type aliases to always work ( #1456 )
...
* Add collections import in typing for type aliases to always work
* Add mypy issue number to the comment
2017-07-03 10:01:19 -07:00
Ivan Levkivskyi
c133a3aca7
First argument to traceback.extract_tb can be None ( #1223 )
...
* First argument to traceback.extract_tb can be None
* Add Optional also to print_tb, format_tb, and walk_tb
2017-04-27 08:07:40 -07:00
Ivan Levkivskyi
ed9f70c738
Replace frozenset with FrozenSet ( #1057 )
2017-03-21 07:52:34 -07:00
Ivan Levkivskyi
b430318ac0
Fix non-subscriptable type aliases ( #993 )
2017-03-13 17:24:34 -07:00
Ivan Levkivskyi
0bf23b3727
Add __annotations__ to Python 3 ( #990 )
2017-03-13 07:38:38 -07:00
Ivan Levkivskyi
bd5b33f3b1
Fix frozenset ( #979 )
2017-03-10 13:59:32 -08:00
Ivan Levkivskyi
10c5e0cb44
Fix build following mypy support for metaclasses ( #952 )
...
Mypy now supports metaclasses in Python 2, see python/mypy#2830
so that now __metaclass__ attribute has special treatment.
This PR makes small changes to fix the build (also most PRs are red because of this)
2017-02-22 12:39:57 +00:00
Ivan Levkivskyi
22c0353498
Add missing imports from typing ( #933 )
2017-02-14 10:59:00 -08:00
Ivan Levkivskyi
70cfe793d9
Implement PEP 526 in typed_ast ( #548 )
...
See dropbox/typed_ast#16 .
2016-09-28 10:31:28 -07:00
Ivan Levkivskyi
db3cc2e8da
Enable typing.DefaultDict as an alias for collections.defaultdict ( #139 )
2016-04-09 09:32:20 -07:00