Conversation
hauntsaninja
left a comment
There was a problem hiding this comment.
I personally like the T suffix (#1872 (comment)), but whatever :-)
| def __init__(self, min: Optional[int] = ..., max: Optional[int] = ..., clamp: bool = ...) -> None: ... | ||
|
|
||
| _PathType = TypeVar("_PathType", str, bytes) | ||
| _PathType = Any |
There was a problem hiding this comment.
| _PathType = Any | |
| _PathType = AnyStr |
There was a problem hiding this comment.
_PathType is never used as a type variable, it's just a glorified Union[str, bytes] return type. (Which means I can leave my obligatory link to python/typing#566 here.)
|
This has a couple of merge conflicts now. I'm not sure I like this change; T is fine for a general-purpose typevar, but I find it clearer to use a more explicit name like |
|
It's also bad user experience in the cases where these types get mentioned in type checker error messages (happened recently where we had to rename |
Closes: #1872