typeddjango / pytest-mypy-plugins

pytest plugin for testing mypy types, stubs, and plugins
https://pypi.org/project/pytest-mypy-plugins/
MIT License
102 stars 24 forks source link

Remove find_dependent_paths and depenent path cleanup #85

Closed zero323 closed 3 years ago

zero323 commented 3 years ago

This PR drops dependent files removal logic from runtest and deletes find_dependent_paths method.

Rationale:

The logic for finding dependent paths is clearly broken at the moment (#83) and clearly does more harm than good.

In general, mypy should be able to identify out-of-date cache items and recompute these with any user intervention, so this functionality should be unnecessary for correctness and serve as a mere optimization to keep cache size under control.

zero323 commented 3 years ago

LGTM!

Thanks @sobolevn

Mypy worked differently back in the days 🙂

I couldn't say ‒ until now I didn't break anything related to cache :)

The idea of cache cleaning / pruning might be still useful, but ti definitely has to be more subtle and with good test coverage that can show use when something breaks. It is also a subject for discussion if, in the current state of things, cleaning test cache is safe

https://github.com/typeddjango/pytest-mypy-plugins/blob/1ad40a97b70c4e15410adf72eed41fbeef69ff45/pytest_mypy_plugins/item.py#L278-L281

It doesn't seem to break anything in an obvious way at the moment, but I'll keep poking around and see what comes up ‒ I hope you don't mind reviewing my silly PRs from time to time ;)

sobolevn commented 3 years ago

I hope you don't mind reviewing my silly PRs from time to time ;)

I am really happy to review your awesome PRs 😉