George Ogden
George Ogden
I ran the mypy primer manually, and there are no changes. For some reason, mypy and GitHub actions don't go well together for larger projects.
This is almost ready. I'm unsure whether to delete the fallback overload, as they make the type checking worse. If I remove them, these will no longer be backwards compatible...
I don't know why the CI is failing, but I've had similar issues with mypy in the past.
Another thing to note is that for the overloads, the interpreter may run an earlier version (eg `__add__` over `__radd__`) and cause an error when the types don't match. This...
I've managed to reproduce some of the failures locally, and they seem to be due to memory limits. It's crashing on large repos: [pandas](https://github.com/pandas-dev/pandas/) and [homeassistant](https://github.com/home-assistant/core/)
I don't quite understand what I should do with `get_proper_type`, but the mypy_primer diff seems to reduce the number of type errors.
@tyralla: before this PR, this worked best with direct comparison to types: `type(x) == int => x: int (1)` this also includes `y: type[int]; type(x) == y => x: int...
> I never really thought about type narrowing with `is` (except for handling `None`, of course). > > If I look at this example: > > ```python > class X:...
This cannot be directly handled here because `==` and `is` are handled together. However, we can compare types instead ```python class X: x = 1 class Y: y = 1...
~The only part I'm not sure about is how to handle the error messages.~