-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fix mypy_test if mypy returns negative exit code #10866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Turn `TestResults` into a dataclass that knows how to combine multiple results.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
MypyResult
enum
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks great! Just one more optional nit:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Thanks!
No description provided.