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 import sys def main(): if sys.platform == "linux": return print("hi") # Statement is unreachable ``` ```terminal > mypy test.py --platform linux ```

bug
p-2

```py def guard(x: object) -> bool: # inferred as "x is int" return isinstance(x, int) def is_even(x: object) -> bool: # inferred as "x is int if True else False"...

p-1
feature
topic-inference
TypeGuard

```py class A: def __init__(self, *args: object): ... def __call__(self, arg: int | str): ... @overload def f(arg: int): ... @overload def f(arg: int): ... @A def f(): ... ```...

feature
p-3

https://github.com/python/mypy/issues/16095 https://github.com/python/mypy/pull/16102#issuecomment-1982172842 (ie, it's based)

good first issue
feature

There's already `(T, U, V)` for `tuple[T, U, V]` and I think what I wrote is all valid syntax, so I think these shorthands are kind of the obvious way...

feature

```py def f(x: object) -> TypeAssertion[int]: # demarcation is tentative, maybe `Asserts[x is int]` assert isinstance(x, int) a: object f(a) reveal_type(a) # int is ``` # Notes: - Would want...

feature
TypeGuard

Okay, so basically, the tests are all convoluted and takes ages because the stdlib loads for each test, so there are all kinds of hacks and workarounds to make them...

project

they aren't very helpful.

good first issue

```py def f(s: str): for item in a: ... ``` Iterating is most often a mistake. We should have an option to prevent these usages . ```py a: Iterable[str] =...

feature

Variadic tuples should be like `tuple[int]` Variadic tuples could be denoted as `(*int,)` Fixed length tuples should be `(int,)` There is a question about if `tuple[int, ...]` should still be...