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

- resolves: #518 - resolves: #432 - resolves: #451

To consider for pages: - stable and latest branches, or branches for each release? Does pages have a multiple releases kind of thing?

Often iterating a string is a mistake, it should be explicit in some way, maybe `iter(my_str)`? ```py s: str for item in s: # error: iterating a string, user 'iter(s)'...

feature

```py foo: "int" = 1 # error: quotes are not necessary (expression is valid at runtime) ``` ```py from __future__ import annotations foo: "Foo & Bar" = 1 # error:...

feature

```py class A: a: ClassVar = [] # expected error: cannot infer type, add explicit annotation ```

feature

```py class A: a: ClassVar = 1 reveal_type(A.a) # Expression has type "Any (from omitted generics)" ```

feature

```py def f(): a = 1 b: 1 = a # error ``` This shouldn't be an error, `a` can never be modified.

p-1
feature

```py a: x is int b: TypeGuard[int] ``` Until they are fully supported as subtypes of `bool`

bug
TypeGuard

```py def guard(x: object, y: object) -> a is int & b is str if True else a is str & b is int: ... ``` The tricky part is...

feature