Open giuliano-macedo opened 12 months ago
Just to add more context: This issue can cause confusion when using mypy-baseline since it wouldn't match the mypy-baseline.txt when running in the CI without cache if the user first create the mypy-baseline.txt in his machine while having the mypy cache
Bug Report Depending if the cache is present or not, mypy will accuse different overload methods names for typing errors in zip/islice uses. I've tried to reproduce de error using specific overload methods in a custom class, however mypy is consistent in this case (see extra section in the end of the issue) .
To Reproduce
main.py file:
steps to reproduce inconsistent report:
Expected Behavior I would expect
mypy
to always report that theislice
function/class doesn't have the required overload even if it doesn't have a cache already built.Actual Behavior
Note that the first mypy execution accused the
__init__
method not having the requested overload, and in the second execution it changed toislice
.Your Environment
mypy.ini
(and other config files): (none)extra
If main.py is:
mypy will always accuse that the
__init__
method doesn't have the overload requested:another example
the same issue can happen with the
zip
method:main.py
mypy execution: