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 a: Any = [1] # error: list[Any] ```

p-1
topic-any
topic-inference

```py class C: # Note: Generic[T] missing def bad_idea(self, x: T) -> None: self.x = x # should be error def nope(self, x: T) -> None: self.x = x #...

bug

```py def f(a: float) -> None: if isinstance(a, float): reveal_type(a) return reveal_type(a) ```

if application mode is enabled, we can make assumptions about subclasses

```py class A: ... A() or 1 # error, we know that it's not a subtype that has an `__eq__` reveal_type(A()) # Exactly[A] def f(a: A): a or 1 #...

p-1
feature
strict-equality

- as a subset of #202 we should narrow literals: ```py a = 1 reveal_type(a) # i expect "1" ```

feature

`Final` means `ReadOnly`, need a way to distinguish

Shouldn't there be separate denotations for final and read-only? should `Final` mean read only?

feature
generic modifier

### Describe the problem, ie expected/actual result (if it's not blatantly obvious) original issue: https://github.com/pydantic/pydantic/issues/9902 also raised on bpr: https://github.com/DetachHead/basedpyright/issues/536 since mypy is able to detect that the positional argument...

bug