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 __future__ import annotations from types import FunctionType from typing import Callable, Protocol class Named(Protocol): __name__: str __qualname__: str class Foo: @staticmethod def foo(fn: Callable[[str], None] & Named) ->...

```py from basedtyping import Intersection class A: ... class B: ... class C(A, B): ... AB = Intersection[A, B] print(isinstance(C(), AB)) ```

topic-intersection

```py a = [1] if bool() else [""] # fail b = [1] or [""]# fail ``` this should be `list[int] | list[str]` but, it's epic fail instead

bug

```py from enum import Enum from typing import final class A(Enum): a = 1 class B: ... a: A if a or 1: print("hi") if isinstance(a, B): ... @final class...

```py a: 1.1 = 1.1 ```

feature

```py def f1(a: int, *, b: str=""): ... def f2(a: int, *, b: str): ... def call[**P](fn: Callable[P, None], *args: P.args): fn(*args) call(f1, 1) # ok call(f2, 1) # error...

feature

when setting `"mypy-type-checker.preferDaemon": true` in vscode settings, it doesn't use the daemon. i think because it's expecting the version output to start with "dmypy" but basedmypy prints this instead: ```...

p-1