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

pytype crashes with syntax error on del statement #42

Closed
markshannon opened this issue Jan 18, 2017 · 2 comments
Closed

pytype crashes with syntax error on del statement #42

markshannon opened this issue Jan 18, 2017 · 2 comments

Comments

@markshannon
Copy link

This is causing the typeshed CI to reject the following valid code:
https://github.com/markshannon/typeshed/blob/362bedecd9778196e44d4c88acc39313bb38a6ba/stdlib/2/os/path.pyi

@matthiaskramm
Copy link
Contributor

So far, we have put an underscore in front of classes or types that are internal to a module. The advantage is that sometimes you do need to refer to an (internal) class of a module from a different pyi.

In the example of path.pyi, the internal type is a Union. Maybe we just shouldn't export union types from pyi, by default? Do we have any use cases where you'd actually want to declare a union in one pyi, but use it in another?

@rchen152
Copy link
Contributor

rchen152 commented Sep 8, 2018

Typeshed's convention is still to prefix the names of typing constructs with an underscore; it's unlikely that pytype's parser will ever (intentionally) support del.

@rchen152 rchen152 closed this as completed Sep 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants