-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Preferring explicit Incomplete
for unannotated arguments
#8472
Comments
For me, a key factor here is pyright. Pyright infers an unannotated argument or return type as Other type checkers could plausibly also introduce similar distinctions in the future between types explicitly annotated with
|
Oh, interesting. Agreed that we should prioritise type checker results over usability for ourselves. That said, there's a quick and easy hack that seems to get us best of both worlds:
Alternatively, we could maybe ask Eric to bless |
Mypy has different behaviour for unannotated arguments too, although it's more complicated:
|
Apart from typechecker issues, I have a slight preference for unannotated items:
That said, I don't have strong feelings either way. |
Since, as @Akuli points out, we'd probably want mypy to bless |
Okay, sounds like there's maybe too much going on here to mess with + no one else really seems in favour of explicit |
This came up in #8458
Currently CONTRIBUTING.md states:
Leaving things unannotated helps distinguish from cases where we actually need
Any
. But we didn't haveIncomplete
when that was written.Incomplete
accomplishes the same thing and is easier to grep for, e.g. #4641 mentions grepping for incomplete as a good way to find potential areas to contribute.The text was updated successfully, but these errors were encountered: