Skip to content
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

Install types to correct environment #11457

Merged
merged 8 commits into from Nov 27, 2021
Merged

Install types to correct environment #11457

merged 8 commits into from Nov 27, 2021

Conversation

weddige
Copy link
Contributor

@weddige weddige commented Nov 4, 2021

Description

Fixes #11405 by using options.python_executable instead of sys.executable.

Test Plan

I tested the change manually with an internal project, that was affected by #11405.

mypy/main.py Outdated Show resolved Hide resolved
@weddige
Copy link
Contributor Author

weddige commented Nov 4, 2021

I am not entirely sure, what the desired behavior for --no-site-packages is. I tend to the conclusion that --no-site-packages and --install-types are not compatible and the combination should be disallowed.

@ethanhs
Copy link
Collaborator

ethanhs commented Nov 4, 2021

I tend to the conclusion that --no-site-packages and --install-types are not compatible and the combination should be disallowed.

Yes, I would agree. Could you have mypy give an error and fail fast in this case please?

@weddige
Copy link
Contributor Author

weddige commented Nov 5, 2021

Yes, I would agree. Could you have mypy give an error and fail fast in this case please?

I added a check for that.

@ethanhs
Copy link
Collaborator

ethanhs commented Nov 24, 2021

Ok, I think this looks good, would you be able to add a few tests please?

@JelleZijlstra JelleZijlstra merged commit 902df03 into python:master Nov 27, 2021
14 checks passed
tushar-deepsource pushed a commit to deepsourcelabs/mypy that referenced this pull request Jan 20, 2022
Fixes python#11405 by using `options.python_executable` instead of `sys.executable`.
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.

--install-types does not work with --python-executable
4 participants