Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New semantic analyzer: dummy alias definitions in typing stub (List etc.) #6297

Closed
JukkaL opened this issue Feb 1, 2019 · 2 comments · Fixed by #6358
Closed

New semantic analyzer: dummy alias definitions in typing stub (List etc.) #6297

JukkaL opened this issue Feb 1, 2019 · 2 comments · Fixed by #6358
Assignees
Labels
priority-0-high semantic-analyzer Problems that happen during semantic analysis

Comments

@JukkaL
Copy link
Collaborator

JukkaL commented Feb 1, 2019

Support definitions for built-in type aliases List, Set in the stub for typing. Currently these don't work, which is a problem since typeshed includes these, whereas test fixtures don't.

@JukkaL JukkaL added semantic-analyzer Problems that happen during semantic analysis priority-0-high labels Feb 1, 2019
@ilevkivskyi
Copy link
Member

FWIW I just whitelisting some test cases to the new semantic analyzer, and it looks like many of them are blocked by this:

Actual:
  tmp/builtins.pyi:1: error: Module 'typing' has no attribute 'List' (diff)
  tmp/builtins.pyi:1: error: Module 'typing' has no attribute 'Set' (diff)

I will work on this next to unblock the situation.

@ilevkivskyi ilevkivskyi self-assigned this Feb 5, 2019
@JukkaL
Copy link
Collaborator Author

JukkaL commented Feb 5, 2019

Note that my current working branch makes changes to how the aliases are handled.

ilevkivskyi added a commit that referenced this issue Feb 12, 2019
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()`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-0-high semantic-analyzer Problems that happen during semantic analysis
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants