Skip to content

Add MYPYPATH To Stubtest Documentation #8868

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 4 commits into from
Oct 9, 2022

Conversation

HassanAbouelela
Copy link
Contributor

MYPYPATH must be set to the stub directory when running subtest on third party packages, otherwise the stubs won't be found. This is already done in scripts, but not mentioned in the relevant documentation.

MYPYPATH must be set to the stub directory when running subtest on third
party packages, otherwise the stubs won't be found. This is already done
in scripts, but not mentioned in the relevant documentation.

Signed-off-by: Hassan Abouelela <[email protected]>
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 updating this, one comment

@AlexWaygood
Copy link
Member

This PR conflicts a little with #8822. Not sure how we want to resolve that.

@HassanAbouelela
Copy link
Contributor Author

Ah I should've done a better job looking at existing PRs. If this section is removed anyway, I'm happy to just close this PR.

I do hope some mention of it is kept, as it is still convenient to run stubtest with other options (such as concise), which isn't as easy with the script. However, toggling the ignore in metadata is something I wasn't aware of and is a good substitute.

@AlexWaygood
Copy link
Member

AlexWaygood commented Oct 8, 2022

I do hope some mention of it is kept, as it is still convenient to run stubtest with other options (such as concise), which isn't as easy with the script.

That's very fair! (I'm also very happy for this PR to be merged before mine btw.)

Maybe, as Shantanu suggests, we should keep the example (with your revisions) and move it down to the section on stubtest_third_party.py? I feel like it doesn't make much sense in the current section, but your rationale for keeping it somewhere makes a lot of sense.

@hauntsaninja
Copy link
Collaborator

Let's merge #8822 first and once it's merged, move the example down like Alex suggests :-)

@hauntsaninja
Copy link
Collaborator

Okay @HassanAbouelela , just merged the other PR!

# Conflicts:
#	tests/README.md
Move the instructions for manually running stubtest on third party
packages to the correct section.

Signed-off-by: Hassan Abouelela <[email protected]>
@HassanAbouelela
Copy link
Contributor Author

Thanks, I've merged in the other changes now

Add missing information about the required setup for running subtest manually.

Co-authored-by: Alex Waygood <[email protected]>
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 again, looks great!

@hauntsaninja hauntsaninja merged commit 70e48ff into python:master Oct 9, 2022
@HassanAbouelela HassanAbouelela deleted the stubtest-mypypath branch October 9, 2022 00:18
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