basedmypy icon indicating copy to clipboard operation
basedmypy copied to clipboard

Based Python static type checker with baseline, sane default settings and based typing features

Results 446 basedmypy issues
Sort by recently updated
recently updated
newest added

```py from typing import Generic from basedtyping import T class A(Generic[T]): def __init__(self, t: T = 1): ... a = A() ```

feature
topic-inference

To make an iterable that doesn't support `str`: ```py class WorkProperlyIterable(Iterable[out_T], Protocol): __contains__: NotRequired["(object) -> bool"] ```

feature

```py from __future__ import annotations from typing import Callable, Never from basedtyping import P class A: pass def f(fn: Callable[P, object]): ... a: A & Callable[[Never], object] b: A &...

bug
topic-intersection

something like: ```py class _Wrapped(Protocol[_PWrapped, _RWrapped]): __wrapped__: Callable[_PWrapped, _RWrapped] C = TypeVar("C", bound=Callable) class _Wrapper(Generic[_PWrapped, _RWrapped]): def __call__(self, f: C) -> _Wrapped[_PWrapped, _RWrapped] & C: ... ``` well, `_Wrapper` is...

p-1
typeshed

Turns out that it is needed in code, who woulda guessed... # Workaround ```py class Named(Protocol): __name__: str __qualname__: str a: "(int) -> str" & Named ```

feature

in contextlib.pyi it should be: ```py class ContextDecorator: def __call__(self, func: "(P) -> R") -> "def (P) -> R": ... ```

typeshed

simple scenario: ```py @overload def f(a: str) -> int: ... @overload def f(a: int) -> str: ... def f(a): return a ``` more realistic scenario: ```py from typing import overload...

p-1
feature

```py from typing import TypeVar T = TypeVar("T") R = TypeVar("R", bound=T) def foo(t: T, r: R): ... o: object f: float foo(f, o) # no error ```

bug
p-1