You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#6297
This adds support for real typeshed stubs that define dummy aliases like `typing.List`, `typing.Dict`, etc. This also fixes couple related issues, so that builtin SCC is almost clean (the two remaining errors are #6295 and #6357).
Most notably, this PR introduces some re-ordering of targets in builtin SCC, removing this reordering requires some non-trivial work (namely #6356, #6355, and deferring targets from `named_type()`).
…es (and other aliases) (#6390)
Fixes#6355
This does three non-trivial things:
* Creates placeholder with `becomes_typeinfo=True` if r.h.s. is such a placeholder (i.e. the definition is a potential type alias).
* Defers all `Invalid type` and use of corresponding unbound types until final iteration.
* Moves few tests in newly enabled test file to new semantic analyzer only (those where new behaviour is clearly better).
I added a bunch of new tests for things that was broken, plus some variations (although some of them are trivial, replacing `NameExpr` with `MemberExpr` or `IndexExpr`).
I also verified that this PR fixes the crash in mypy self-check.
The old logic for type aliases will create variables in stead of aliases in case the target is class but it is not ready. An example is:
The text was updated successfully, but these errors were encountered: