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

```python from typing import TypeVar class Foo: ... class Bar: ... T = TypeVar("T", bound=Foo & Bar) # error: TypeVar "bound" must be a type # error: Unsupported left operand...

bug
topic-intersection

We can't use `In`/`Out` modifiers because that's a syntax error ```py class A[Out[T]]: ... ^ SyntaxError: invalid syntax ``` So what about semantic naming for type vars? `in_T`/`out_T`? - related...

feature
basedtyping

```py def foo() -> Never: ... # allowed b = Union[int, str] # not allowed ``` `basedtyping` as well. Maybe `types` as well. We could modify `sitecustomize.py` to actually load...

future-annotations

```py a: int & str reveal_type(a) # int & str, should be Never ```

feature
topic-intersection

- resolves #614 - resolves #80 - resolves #620 - resolves #624 ```py from __future__ import annotations from typing import * from types import FunctionType some_callable: Callable[['C'], int] class C:...

Before you raise this, consider if it's better suited to a discussion: https://github.com/KotlinIsland/basedmypy/discussions e.g. ```py def foo(x: int,_) -> int:#Error, but I don't want it to be ... ``` Sometimes,...

feature

```py a: int | None b: str | None a == b # Non-overlapping equality check (left operand type: "int | None", right operand type: "str | None") [comparison-overlap] ```...

problem :trollface:

I think `sealed` should be default be scoped to the root package, not the current module.

feature
strict-equality

```py def f(value: str, optional=False): if value.startswith("a"): if optional: return None raise ValueError return value ``` This should find the two overloads automatically.

feature
topic-inference

```py def f(a): # def f[T](a: T) -> T return a def find(data: list, predicate: "(...) -> ..."): # find[T](data: list[T], predicate: (T) -> T) -> T for item in...

feature
topic-inference