Skip to content

Conversation

@hauntsaninja
Copy link
Collaborator

Having an obscure type variable name is causing some pretty inscrutable
errors. For instance:

xarray/core/utils.py:466: error: Value of type variable "_LT" of "sorted" cannot be "K"
tornado/simple_httpclient.py:324: error: Value of type variable "_LT" of "min" cannot be "Optional[float]"

I think having a more descriptive type variable name here is better for
user experience and helps address the "why" of an error. "_LT" is much
clearer in the context of the stub than it is out of context in an error.

Having an obscure type variable name is causing some pretty inscrutable
errors. For instance:
```
xarray/core/utils.py:466: error: Value of type variable "_LT" of "sorted" cannot be "K"
tornado/simple_httpclient.py:324: error: Value of type variable "_LT" of "min" cannot be "Optional[float]"
```

I think having a more descriptive type variable name here is better for
user experience and helps address the "why" of an error.
This was referenced Sep 26, 2020
@JelleZijlstra
Copy link
Member

I agree, I'm generally not too happy with the PEP 8 recommendation to give typevars very short names.

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

Successfully merging this pull request may close these issues.

2 participants