basedmypy
basedmypy copied to clipboard
Based Python static type checker with baseline, sane default settings and based typing features
Which would be a path in the project (usually `stubs`) that are vendored third party stubs, usually generated with stubgen. These would have a very loose strictness applied to them,...
There are many situations where things only work statically, and can't be executed: ```py from typing import TYPE_CHECKING If TYPE_CHECKING: from _typedshed import SupportsX else: SupportsX = type("SupportsX", (), {})...
Follow up from #75
current: ```py b: bool reveal_type("" if b else 1) # object ``` proposed: ```py b: bool reveal_type("" if b else 1) # str | int ```
TLDR: Provide a way to have stubs that don't contain everything in the package. Currently, when creating stubs, you have to create stubs for everything under the top level (including...
Overriding existing types and monkey patching sounds based. ```pyi @extension[str] class StrExtension: foo: int "asdf".foo + 1 ``` While often frowned upon(just fix it at the source), it could be...
After a successful committee meeting it has been decided that infer return type is based and will succeed default-return and deprecate it.
```py a = AMONGUS # type: ignore[name-defined] b = a + 1 ``` I think `a` should have an error stating that it needs an explicit type. Although I wonder...
It should be able to update individual files if that file has no errors. It should respect the config options the baseline was created with, not just the targets.
```py @overload def foo(a: int) -> int: ... @overload def foo(a: str) -> str: ... def foo(a: object) -> object: return object() ``` I think that the return type shouldn't...