Commit Graph
57 Commits
Author SHA1 Message Date
Ivan LevkivskyiandGitHub 2c180dd153 Revert "A temporary change for integration testing. Will be removed soon (#4996)" (#4997)
This reverts commit 8c0cad6e2f.
2021-02-01 21:22:12 +00:00
8c0cad6e2f A temporary change for integration testing. Will be removed soon (#4996)
Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-02-01 19:50:26 +00:00
55549ea01f More consistency checks for dependencies (#4990)
Closes #4988

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-02-01 15:16:53 +00:00
e2fd852952 Add more consistency tests (#4983)
Follow up fo #4971

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-29 17:23:35 +00:00
e70d06962a Update documentation to better reflect new directory structure. (#4976)
See #2491 for previous discussion.

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-28 09:09:29 +00:00
16ae4c6120 Re-organize directory structure (#4971)
See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-27 12:00:39 +00:00
a1a51f5aac Add another (newly added) package name to ditribution map (#4970)
Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-25 12:25:50 +00:00
83c18117d5 Update known package to distribution map for migration script (#4963)
Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-22 16:12:04 +00:00
1feccfc54a Some minor fixes (#4930)
Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-12 13:40:59 +00:00
add4d92f05 A temporary protobuf patch (#4907)
Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-05 19:13:21 +00:00
4141dd1176 Few more fixes for issues found by testing on internal codebases (#4876)
Few unrelated (but quite obvious) fixes here.

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2020-12-30 17:32:14 +00:00
fb753c4226 Loosen some types to avoid pain in real-life situations (#4870)
In this diff:
* Loosen `set.__[i]sub__()` to allow typical use cases (that work at runtime). Namely, allow removing `unicode` from a set of `str`, and allow removing optional values from non-optional sets.
* Avoid using union return types in `cryptography` deserialization functions.
* Tune `SupportsItems` so that `dict` implements it on Python 2.

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2020-12-29 18:31:14 +00:00
472d830876 Fix well known types in protobuf stubs (#4845)
Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2020-12-21 16:20:53 +00:00
53d7813b3c Try fixing mypy-protobuf backwards incompatibility (#4833)
Currently, the only way forward would be to update `mypy` and `mypy-protobuf` at the same time, which causes pain. The imprecise fallback overloads can be removed later, I leave comments about this.

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2020-12-18 13:35:28 +00:00
Ivan LevkivskyiandGitHub 5c7cf9f75c Script for modular typeshed migration (#4259)
This reshuffles directory structure according to the specification in https://github.com/python/typeshed/issues/2491#issuecomment-611607557
2020-07-01 12:36:23 +01:00
Ivan LevkivskyiandGitHub e199c2e4bc Fix concurrent.futures import for re-export (#4105)
Also update stubtest whitelist as a workaround.
2020-05-27 13:51:01 +01:00
Ivan LevkivskyiandGitHub 5342d66dcc Fix assert_has_calls() signature (#3967)
See the docs https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.assert_has_calls
2020-05-05 19:20:56 +01:00
Ivan LevkivskyiandGitHub 8c7f489d1b Organize special forms in typing (#3966)
This is an accompanying PR for https://github.com/python/mypy/pull/8779, see https://github.com/python/mypy/pull/8779#issuecomment-624001349

I also noticed that Python 2 and Python 3 versions are a bit out of sync, so I also put them back in sync.
2020-05-05 13:55:31 +01:00
Ivan LevkivskyiandGitHub aa945cde03 Add six.moves.collections_abc. (#3812) 2020-03-06 00:13:24 +00:00
Ivan LevkivskyiandGitHub 8b28b49c61 Mark some obviously incomplete stubs as incomplete (#3807) 2020-03-04 17:02:14 +00:00
Ivan LevkivskyiandGitHub e7d68027e7 Fix some issues in cryptography (#3802) 2020-03-02 18:50:45 +00:00
Ivan LevkivskyiandGitHub ca1ca0c14f Move tornado to 2and3 (#3780)
This also uses a trick to avoid `Incompatible with supertype` errors for `get()` etc. that used to have signature like `def get(*args, **kwars): ...` (that btw is used in tornado itself, see https://github.com/tornadoweb/tornado/blob/master/tornado/web.py#L266).
2020-02-26 22:53:48 +00:00
Ivan LevkivskyiandGitHub 6d33cf3382 Move gflags to 2and3 (#3779)
Move gflags to 2and3
2020-02-26 17:57:50 +00:00
Ivan LevkivskyiandGitHub 8df632bca5 Fix some issues in cryptography package (#3474)
Note: the verifier() methods are not in docs, but they don't look private and are actually used in some code.
2019-11-21 17:05:22 +00:00
Ivan LevkivskyiandGitHub 05780a0d11 Fix errors discovered by running typeshed check on Windows (#3456)
Fix errors discovered by running typeshed check on Windows. This is a temporary fix for #3446 (in long term we should figure out why these were not caught by typeshed CI).

I also remove an outdated comment while I am at it.
2019-11-11 12:18:58 +00:00
Ivan LevkivskyiandSebastian Rittau d0f3eb2d6b Use Text for text arguments to click.[un]style (#3233) 2019-09-16 15:36:28 +02:00
Ivan LevkivskyiandGitHub 3cfc3150f0 Partially restore old (imprecise) signature of Match.group() (#3190)
This partially reverts #3172
2019-08-16 19:53:52 +01:00
Ivan LevkivskyiandGitHub 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 LevkivskyiandGitHub 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 LevkivskyiandJelle Zijlstra 5327484176 Use type annotation syntax (#3048) 2019-06-10 20:20:59 -07:00
Ivan LevkivskyiandGitHub 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 LevkivskyiandSebastian Rittau 50d98acc76 Remove redundant variable definitions in ast module (#2986) 2019-05-13 19:32:24 +02:00
Ivan LevkivskyiandSebastian Rittau 75723e3885 Add an optional opener parameter to open() function (#2977)
Fixes #2976
2019-05-09 16:59:32 +02:00
Ivan LevkivskyiandGitHub 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 LevkivskyiandGitHub 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 LevkivskyiandJelle Zijlstra 0b8e32269a Fix named tuple name in posix.pyi (#2800) 2019-02-15 17:39:27 -08:00
Ivan LevkivskyiandSebastian Rittau ca62cecd14 Fix Flask.config annotation (#2787) 2019-02-11 14:19:42 +01:00
Ivan LevkivskyiandGitHub 9ffa1d8237 Update stubgen link and add a bit more info (#2779) 2019-02-03 14:47:34 +00:00
Ivan LevkivskyiandGitHub 75e13a0f36 Add Final to typing_extensions (#2453) 2018-09-13 15:07:42 +01:00
Ivan LevkivskyiandJelle Zijlstra 8ed0159445 Remove duplicate method definitions in importlib and jinja2 (#2427) 2018-09-04 07:50:47 -07:00
Ivan LevkivskyiandJelle Zijlstra 126b3e17fd Revert #2347 (#2377) 2018-08-09 13:22:12 -07:00
Ivan LevkivskyiandGitHub 7dd4d0882d Update return type of dataclasses.field (#2197) 2018-06-05 16:57:20 +01:00
Ivan LevkivskyiandJelle Zijlstra 7ae2f25216 Fix some problems introduced by recent commits. (#1905) 2018-02-20 13:34:48 -08:00
Ivan LevkivskyiandGitHub 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 LevkivskyiandGuido van Rossum ec2cb8e44f Convert selected ABCs to Protocols (#1220) 2017-11-19 08:52:16 -08:00
Ivan LevkivskyiandŁukasz Langa 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 LevkivskyiandJelle Zijlstra d75ea88da5 Use 'as name' patter to re-export names from stubs (PEP 484) (#1484) 2017-07-14 21:31:53 -07:00
Ivan LevkivskyiandJelle Zijlstra 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 LevkivskyiandJelle Zijlstra 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 LevkivskyiandJelle Zijlstra ed9f70c738 Replace frozenset with FrozenSet (#1057) 2017-03-21 07:52:34 -07:00
Ivan LevkivskyiandGuido van Rossum b430318ac0 Fix non-subscriptable type aliases (#993) 2017-03-13 17:24:34 -07:00
Ivan LevkivskyiandGuido van Rossum 0bf23b3727 Add __annotations__ to Python 3 (#990) 2017-03-13 07:38:38 -07:00
Ivan LevkivskyiandGuido van Rossum bd5b33f3b1 Fix frozenset (#979) 2017-03-10 13:59:32 -08:00
Ivan LevkivskyiandJukka Lehtosalo 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 LevkivskyiandGuido van Rossum 22c0353498 Add missing imports from typing (#933) 2017-02-14 10:59:00 -08:00
Ivan LevkivskyiandDavid Fisher 70cfe793d9 Implement PEP 526 in typed_ast (#548)
See dropbox/typed_ast#16.
2016-09-28 10:31:28 -07:00
Ivan LevkivskyiandGuido van Rossum db3cc2e8da Enable typing.DefaultDict as an alias for collections.defaultdict (#139) 2016-04-09 09:32:20 -07:00