pytype icon indicating copy to clipboard operation
pytype copied to clipboard

A static type analyzer for Python code

Results 237 pytype issues
Sort by recently updated
recently updated
newest added

Hi, I am checking my project with pytype and I am experiencing an error that happens non-deterministically, even resetting the caches happens about 30% of the attempts project: https://github.com/andrew-ld/LL-mtproto commit:...

bug
cat: infrastructure

Take this example code, I was hoping pytype would flag the bug of blindly using an `&` on the result of an `Optional[int]` function without checking for None. It unfortunately...

bug
cat: callables

The following code will result in a false `wrong-arg-types` error: ```python # src/components.py from typing import TYPE_CHECKING, Dict if TYPE_CHECKING: from .loaders import Foo class Component: def __init__(self, foos: Dict[int,...

bug
cat: core

Hi, I've found that when a nested TypedDict class is used from another module, type checking doesn't seem to apply. But when it isn't nested (i.e., top-level TypedDict class), it...

bug
cat: core

If I have two files, like so: test.py ```python from typing import TypedDict import test2 class Foo(TypedDict, total=False): x: int y: int x: Foo = {'x': 1} x: test2.Foo =...

bug
cat: stubs and 3p

I have two TypedDicts. They share the same fields, except the second one has a few extra fields. I want to create a function that works on the former, that...

bug
cat: core

Hey folks, I'm getting some very inconsistent behavior with the following code: ```python from __future__ import annotations from typing import Callable, Generic, TypeVar from typing_extensions import TypedDict T = TypeVar('T')...

bug
cat: generics

### Example Code ```python from typing import Any, Callable, Iterator, TypeVar, overload T = TypeVar('T') def listify(func: Callable[..., Iterator[T]]) -> Callable[..., list[T]]: def helper(*args: Any) -> list[T]: return list(func(*args)) return...

bug
cat: callables

### Example Code **a.py** ```python x = [] ``` **b.py** ```python from a import x ``` ### Expected Behavior pytype can generate a stub file for `a.py` that mypy is...

enhancement
cat: stubs and 3p

### Example Code ```python from enum import Enum class LogLevel(Enum): INFO = 0 WARN = 1 if LogLevel.INFO < LogLevel.WARN: print("'INFO' is less than 'WARN'") if object() < object(): print("'object()'...

enhancement
cat: core