Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Install types to correct environment - #11457

Merged
JelleZijlstra merged 8 commits into
python:masterfrom
weddige:fix-11405
Nov 27, 2021
Merged

Install types to correct environment#11457
JelleZijlstra merged 8 commits into
python:masterfrom
weddige:fix-11405

Conversation

@weddige

@weddige weddige commented Nov 4, 2021

Copy link
Copy Markdown
Contributor

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.

Comment thread mypy/main.py Outdated
@weddige

weddige commented Nov 4, 2021

Copy link
Copy Markdown
Contributor Author

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.

@emmatyping

Copy link
Copy Markdown
Member

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

weddige commented Nov 5, 2021

Copy link
Copy Markdown
Contributor Author

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

I added a check for that.

@emmatyping

Copy link
Copy Markdown
Member

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
tushar-deepsource pushed a commit to DeepSourceCorp/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