-
Notifications
You must be signed in to change notification settings - Fork 0
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
A few questions about strictness #7
Comments
My thoughts:
|
|
The use for |
I also like the idea of having function bodies that provide extra information for type checkers to use. Functions can already be annotated with For I'm not sure about |
I would that that for now we mandate that conforming stubs must use I'd prefer not to put "wishlist" items in the PEP, just currently supported things. The PEP can always be amended later! |
Makes two small and (hopefully) noncontroversial changes: * `# type: ignore` is allowed on every line, as described in #7. * __{get,set}attr__ should not replace more specific definitions.
These are a few things I know exist in some existing stubs. Should we completely prohibit them, or do something else?
raise
statements. I think this is intended to mean "this function may raise exception X", but I don't know of any type checker that uses this information....
. I know pytype chokes on some complicated defaults like bytes literals. Perhaps we should mandate that all default values are...
, or allow only simple values likeNone
,True
,False
, and integers.# type: ignore
. We've encountered mypy-pytype incompatibilities here in the past. I think# type: ignore
should be valid on every line.The text was updated successfully, but these errors were encountered: