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

# Search terms ownership, variance #410 would benefit from knowledge regarding ownership (ie, if something keeps references to something) ```py def foo() -> Unowned[list[str]]: return [""] # no error def...

feature

```py reveal_type(get_args(Literal[1, 2])) # tuple[Any, ...] expected, tuple[1, 2] or tuple[1 | 2, ...] ```

feature

```py class A: a: int class B: a: int a: ProtocolOf[A] = B() # no error ``` Maybe, we could just say `Protocol`

```py d: date | None f"{d:%d}" # error: Unrecognized format specification "%d/%m/%Y" [str-format] ```

```py from pydantic import BaseModel, Field class A(BaseModel): a: object = Field(default=None) ```

bug

```py import dataclasses class A: def a(self): if dataclasses.is_dataclass(self): reveal_type(self) ```

bug
TypeGuard

```py def f(x: object) -> TypeAssertion[int]: # demarcation is tentative, maybe `Asserts[x is int]` assert isinstance(x, int) a: object f(a) reveal_type(a) # int is ``` # Notes: - Would want...

feature
TypeGuard

- resolves #522 - resolves #519