Eugene Toder

Results 47 issues of 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...

enhancement
cat: generics

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...

bug
cat: core

```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",...

bug
cat: generics

```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...

bug
cat: generics

```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 ```...

bug
cat: core

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...

bug
cat: control flow

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...

bug
cat: enums

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...