Fix mypy_test if mypy returns negative exit code#10866
Fix mypy_test if mypy returns negative exit code#10866AlexWaygood merged 11 commits intopython:mainfrom
Conversation
Turn `TestResults` into a dataclass that knows how to combine multiple results.
There was a problem hiding this comment.
Things I like here:
- The existing behaviour of propagating the "maximum" returncode didn't make much sense; this PR fixes it
- I love the new
MypyResultenum
I'm not so sure about the changes to the TestResults class, though. Something that struck me as I was reviewing #10724 was that it's a bit weird that we use the same TestResults class to represent "the results of running mypy on one stubs package" and "the results of running mypy_test.py on the whole of typeshed". Those are conceptually different tasks, and it's already a bit of a leaky abstraction on main -- having a packages_skipped attribute on a TestResults instance representing the results of running mypy on one stubs package doesn't really make much sense. I think we should probably separate out the two concepts into two different "result" classes, but this PR feels like it's going in the opposite direction a little bit
|
We could let |
Return new TestResult tuple from single package test functions
AlexWaygood
left a comment
There was a problem hiding this comment.
Thanks, this looks great! Just one more optional nit:
No description provided.