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 * out_T = TypeVar("out_T", covariant = True) class A(Generic[out_T]): @classmethod def f(cls, t: out_T) -> None: print("hi") ```

feature

### Describe the problem, ie expected/actual result (if it's not blatantly obvious) When writing tests with pytest, any method decorated with `@pytest.fixture` causes `no-any-expr` to be reported. ``` $ poetry...

good first issue
topic-any

```py from typing import Annotated from typing import _T as T F = Annotated[T, 1] # error a: F[int] = 1 ```

bug
topic-any

```py @overload def foo(value: str) -> int: ... @overload def foo[T](value: T) -> T: ... def foo[T](value: T | str): if isinstance(value, str): return 1 return value # Incompatible return...

```py class A[T]: def f(self) -> T: ... reveal_type(A) # [T] () -> test.A[out T] reveal_type(A[int]) # () -> test.A[out int] ```

```py type Digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 # error: valid-type type X = (int,...

p-1
feature

```py type ClassMethod[T, **P, R] = FunctionType[Concatenate[type[T], P], R] ```

stringizer will kill us, but anyway: cpython compatible based syntax: - `(str) > int` for callable syntax, annoyingly `ast` wont see the parens here - `"foo" | "bar"` for string...

```py list[1] # error: invalid bare literal ``` but this is fine actually