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 = 1 a = 2 # should be an error imo ``` ```py a: var = 1 a = 2 # yeah, that's ok ```

feature
basedtyping

```py a: int | str = 1 reveal_type(a) # int | str a = "" reveal_type(a) # str ``` This is actually redefining a as `str`, not reassigning as part...

feature
p-2
feedback

```py class A: ... a: A a or 1 # error: unreachable ``` While not pythonic, final by default is actually better? 😳 related: #38

feature

```py a = 1 debug_type(a) ``` ``` > mypy test.py test.py:1:1: note: Debug type of "a": test.py:1:1: note: upper bound: int (inferred) test.py:1:1: note: narrowed type: Literal[1], narrowed on line...

feature

What about: ```py import sys from basedtyping import ModuleType a: ModuleType[sys] = sys ``` OR, seeing as modules are instances. we could just allow the plain: ```py import sys a:...

feature

In most cases, mypy should be able to figure out the bulk of missing type annotations. Currently `stubgen` does semanal, but it could use 'checker' as well.

feature
stubgen
topic-inference

Maintaining `__all__` is extremely painful, what about an `export` decorator (not sure about attributes though) ```py def export(fn: Fn) -> Fn: mod = fn.__module__ if hasattr(mod, "__all__"): isinstance(mod.__all__, list): mod.__all__.append(fn.__name__)...

runtime
feature

I think it would be pretty useful if there was a simplified way of using `stubgen` that would: - run `stubgen` for all deps with missing types - add them...

feature
stubgen
topic-stubs