DetachHead
DetachHead
It can be frustrating when you have a git configuration to use different line endings to you system default, and mypy write baseline with system line endings instead of git...
```py def foo() -> None: return # no error def bar(cond: bool) -> int | None: if cond: return 1 return # error: Return value expected [return-value] def baz(cond: bool)...
```py reveal_type([0][0]) # currently int, could be 0 ``` _Originally posted by @KotlinIsland in https://github.com/KotlinIsland/basedmypy/pull/340#discussion_r912623393_
Mypy is already way too slow, we need tests to make sure we don't make it any slower
```py class Foo: def __new__(cls, value: int): ... def __init__(self, value): # inferred as int ... ```
```py class A(Any): ... reveal_type(A()) # A ``` This could reveal something like `A(Any)` or `Any(A)` or `Any[A]` ```py class A: def __getattr__(...) -> Any: ... a: A reveal_type(a.foo) #...
The flag will default to false and will be mandatory for all targets. Eg: thirdparty.pyi ```py def foo(a: list[Any]) -> Any: ... ``` my.py ```py from thirdparty import foo reveal_type(foo)...
```py # third_party.py def foo() -> Any: ... ``` ```py # my.py some_list: list[int] = third_party.foo() # that's okay? ```
the current behavior leads to confusion and annoying behavior from pip, especially when trying to switch between normal mypy and basedmypy ``` > pip install mypy==0.910 Requirement already satisfied: mypy==0.910...
 