basedmypy
basedmypy copied to clipboard
Based Python static type checker with baseline, sane default settings and based typing features
```py a: "asdf" | "fdsa" = "asdf" ``` https://github.com/KotlinIsland/basedmypy/pull/137#discussion_r927212154
related: #106
### Describe the problem, ie expected/actual result (if it's not blatantly obvious) ``` test.py:21:26: error: This usage of this covariant type variable is unsafe as an input parameter. If this...
### Describe the problem, ie expected/actual result (if it's not blatantly obvious) #### expected ```py class Foo(Generic[T_co]): @property def foo(self) -> T_co: ... @foo.setter def foo(self, value): # error: unsafe-variance...
### Describe the problem, ie expected/actual result (if it's not blatantly obvious) not sure if there are other errors in mypy with newlines in them. if so, i guess this...
Add support for Intersection types. `Intersection[A, B]` == ``. ```py class A: def foo(self) -> A: ... class B: def foo(self) -> B: ... class C(A, B): def foo(self) ->...
mainly unions and the other swaps in `join.visit_instance` like: `[(1,), '1']`
### Describe the problem, ie expected/actual result (if it's not blatantly obvious) When there are changes near baselined errors, the current algorithm used to match errors to the baseline sometimes...
### Describe the problem, ie expected/actual result (if it's not blatantly obvious) ### Gist to reproduce ```python class A: @property def foo(self) -> int: ... @foo.setter def foo(self, value): reveal_type(value)...
```py foo: int | None = None def bar(): global foo foo = None baz() if foo is None: # error: condition is always True ... def baz(): global foo...