Skip to content

Require mandatory "--python-version" settings in mypy setup #217

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

Closed
DonJayamanne opened this issue Nov 14, 2017 · 3 comments
Closed

Require mandatory "--python-version" settings in mypy setup #217

DonJayamanne opened this issue Nov 14, 2017 · 3 comments
Labels
area-linting feature-request Request for new features or functionality

Comments

@DonJayamanne
Copy link

From @sametmax on November 9, 2017 7:21

Environment data

VS Code version: 1.17.2
Python Extension version: latest to this date
Python Version: any
OS and version:

Actual behavior

Mypy checks the code against the version of Python it's installed in.

Expected behavior

My checks the code against the version of Python the code is written in.

More details here: python/mypy#4222 (comment)

Steps to reproduce:

  • Install mypy with "python3.5 -m pip install"
  • Setup and use vscode with mypy normally

Logs

Output from Python output panel

Output from Console window (Help->Developer Tools menu)

Copied from original issue: DonJayamanne/pythonVSCode#1376

@brettcannon brettcannon changed the title Requires mandatory "--python-version" settings in mypy setup Require mandatory "--python-version" settings in mypy setup Nov 14, 2017
@brettcannon brettcannon added awaiting 1-decision area-linting feature-request Request for new features or functionality labels Nov 14, 2017
@brettcannon
Copy link
Member

Since you can manually set this in your user settings.json file today under python.linting.mypyArgs, I'm closing this as "won't fix".

@sametmax
Copy link

The ability to do it is not the important part. The important part is "mandatory". Right now I have a class full of students using vscode and mypy. They all have fake errors reported because they didn't have the setting added and were stomped. I've been using mypy for a year and learned about the settings last week. And I've been reporting bugs on mypy for a year too.

You can imagine that not only most people don't know about the settings, but they will have errors they will attribute to mypy and vscode not working.

Now I opened a ticket on the mypy issues tracker as well, but I doubt they will break compat with a mandatory settings soon. However, this issue affect users right now, and they won't be able to solve it by themself.

@brettcannon
Copy link
Member

We are planning to rework our tool execution code soon and that might help with this (#228). At that point it will work more like running python3 -m mypy which will help make it more obvious that by default mypy and other tools are being run by the interpreter specified in your VS Code settings and not the one people just happened to install mypy under.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-linting feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants