Skip to content

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

Merged
merged 12 commits into from
Aug 22, 2022

Conversation

AlexWaygood
Copy link
Member

As requested in #8139 (comment)

@AlexWaygood AlexWaygood marked this pull request as ready for review August 21, 2022 18:54
Copy link
Collaborator

@hauntsaninja hauntsaninja left a 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)

@AlexWaygood
Copy link
Member Author

AlexWaygood commented Aug 21, 2022

  • Calling a workflow mypy_selfcheck is very confusing

Yeah, I had no idea what to call this workflow :) your suggestion is good!

@AlexWaygood
Copy link
Member Author

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")
Copy link
Collaborator

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.)

Copy link
Member Author

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 :)

Copy link
Collaborator

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.

Copy link
Member Author

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!

@AlexWaygood
Copy link
Member Author

I'll merge this now, but happy to address any further feedback anybody has in a followup PR!

@AlexWaygood AlexWaygood merged commit 875f0ca into python:master Aug 22, 2022
@AlexWaygood AlexWaygood deleted the mypy-selfcheck branch August 22, 2022 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants