Eugene Toder
Eugene Toder
I did not find any open issues or any notes on https://google.github.io/pytype/support.html, but feel free to close as duplicate if I missed it. It appears that covariant TypeVars are not...
Consider the following example: ```python from collections import ChainMap from typing import TYPE_CHECKING, Mapping, TypeVar if TYPE_CHECKING: _K = TypeVar("_K") _V = TypeVar("_V") _T1 = TypeVar("_T1") _T2 = TypeVar("_T2") class...
```python import typing T = typing.TypeVar("T") class C(typing.Generic[T]): def __init__(self, arg) -> None: self.arg = arg def __class_getitem__(cls, arg): return cls(arg) ``` This produces an unexpected error: ``` File "/home/elt/code/pytype-test/proj/cls_getitem.py",...
```python import typing def test(x) -> bool: return isinstance(x, typing.TypeVar) ``` This produces an unexpected error: ``` File "/home/elt/code/pytype-test/proj/type_var.py", line 4, in test: Built-in function isinstance was called with the...
```python from typing import Any # This comes from a third-party library. def decorator() -> Any: ... class C: @decorator() def method(self) -> None: reveal_type(self) # revealed as Any ```...
Apologies if this is a know issue. I could not find it in the FAQ or in github issues. The common "sentinel value" pattern fails to narrow type and produces...
Consider the following example ```python from enum import Enum class E(Enum): A = 1 B = 2 for x in E: reveal_type(x) # revealed as "E" reveal_type(list(E)) # revealed as...
sqlalchemy documents it in the engine module
Most commonly used with Kerberos. Closes: #769
Enum classes allow iteration over the class, which returns all enum members. This is often convenient particularly when writing tests. Unfortunately, vulture does not understand this and reports enum members...