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

### Describe the problem, ie expected/actual result (if it's not blatantly obvious) _No response_ ### Gist to reproduce ```python Foo = Intersection[1, int] foo: Foo = 1 # error: Variable...

bug

### Describe the problem, ie expected/actual result (if it's not blatantly obvious) _No response_ ### Gist to reproduce ```python foo = Intersection[int, type[int]] ``` ### Basedmypy version _No response_ ###...

bug

```py from typing import overload @overload def f(): ... @overload def f(s: str, a: True = ...): ... def f(s="", a=True): ... v: None f(f"{v}", True) ```

bug
p-1

```py a: Final[str] if a == "a": def f(): ... if a == "a": f() ``` this shouldn't be an error also `possibly-undefined`: ```py def func(x: bool): if x: msg...

feature
p-2

```py def f(a): # dmypy suggest: (str) -> None return 1 a: int = f("") ```

bug

test.py ```py from typing import Protocol import test2 class P(Protocol): def foo(self) -> None: ... a: P = test2 reveal_type(type(a).foo) # Revealed type is "def (self: test.P) -> None" ```...

```py def outer(): def inner(a, b, c): reveal_type(a) # int reveal_type(b) # str reveal_type(c) # int | str inner(1, "a", "b") inner(2, "c", 3) ``` What about private functions as...

feature
topic-inference

```py import re reveal_type(re) # types.ModuleType ``` But mypy knows what module it is, maybe `types.ModuleType['re']`? - related #69

feature