-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
mypy_test.py
: Move type-checking of our tests and scripts into a different test
#8587
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
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 for cleaning this up.
I have some minor feedback:
- Calling a workflow
mypy_selfcheck
is very confusing, especially given that typeshed used to have a test called mypy self check where we'd run mypy over mypy using custom typeshed. - It feels like there are a number of uses of the word "test" floating around. Maybe "typecheck-typeshed-code" is clearer than "test-the-tests" and better covers the fact that we type check scripts?
- This isn't worth 9 CI jobs; the multiple Python versions is overkill. Let's just do 3.9. (Tbh, multiple platforms is also overkill, maybe just make it
--platform win32
and call it a day)
Yeah, I had no idea what to call this workflow :) your suggestion is good! |
Thanks for the review! :) I'll leave this open for a little bit to see if anybody else has any thoughts. |
if platform == "win32": | ||
command.extend(["--exclude", "tests/pytype_test.py"]) | ||
else: | ||
command.append("--ignore-missing-imports") |
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.
Side note: We should probably add the types for the imports we use to tests-requirements. (In a different PR.)
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.
Or maybe script-requirements
/stubsabot-requirements
? (Most contributors aren't going to need to run stubsabot manually, after all :)
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.
I think it's easier to just put all the requirements into one file. It won't hurt much to install these extra requirements, but it's a bit lower of a mental burden for when you need those.
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.
Looking at it again, it seems as though stubsabot's additional requirements are pretty minimal anyway, so it probably doesn't hurt -- you're right!
I'll merge this now, but happy to address any further feedback anybody has in a followup PR! |
As requested in #8139 (comment)