Git Product home page Git Product logo

vscode-mypy's Introduction

Mypy extension for Visual Studio Code

A Visual Studio Code extension with support for the mypy linter. The extension ships with mypy=1.5.1.

For more information on mypy, see https://www.mypy-lang.org/.

Note:

  • This extension is supported for all actively supported versions of the python language (i.e., Python >= 3.8).
  • Minimum supported version of mypy is 1.0.0.

Usage

Once installed in Visual Studio Code, mypy will be automatically executed when you open a Python file.

If you want to disable mypy, you can disable this extension per workspace in Visual Studio Code.

Settings

Settings Default Description
mypy-type-checker.args [] Custom arguments passed to mypy. E.g "mypy-type-checker.args" = ["--config-file=<file>"]
mypy-type-checker.severity { "error": "Error", "note": "Information" } Controls mapping of severity from mypy to VS Code severity when displaying in the problems window. You can override specific mypy error codes { "error": "Error", "note": "Information", "name-defined": "Warning" }
mypy-type-checker.path [] Setting to provide custom mypy executable. This will slow down linting, since we will have to run mypy executable every time or file save or open. Example 1: ["~/global_env/mypy"] Example 2: ["conda", "run", "-n", "lint_env", "python", "-m", "mypy"]
mypy-type-checker.interpreter [] Path to a Python interpreter to use to run the linter server. When set to [], the interpreter for the workspace is obtained from ms-python.python extension. If set to some path, that path takes precedence, and the Python extension is not queried for the interpreter.
mypy-type-checker.importStrategy useBundled Setting to choose where to load mypy from. useBundled picks mypy bundled with the extension. fromEnvironment uses mypy available in the environment.
mypy-type-checker.showNotifications off Setting to control when a notification is shown.
mypy-type-checker.reportingScope file (experimental) Setting to control if problems are reported for files open in the editor (file) or for the entire workspace (workspace).
mypy-type-checker.preferDaemon true (experimental) Setting to control how to invoke mypy. If true, dmypy is preferred over mypy; otherwise, mypy is preferred. Be aware, that the latter may slow down linting since it requires the mypy executable to be run whenever a file is saved or opened. Note that this setting will be overridden if mypy-type-checker.path is set.

Commands

Command Description
Mypy: Restart Server Force re-start the linter server.

Logging

From the command palette (View > Command Palette ...), run the Developer: Set Log Level... command. From the quick pick menu, select Mypy Type Checker extension from the Extension logs group. Then select the log level you want to set.

vscode-mypy's People

Contributors

karthiknadig avatar microsoftopensource avatar detachhead avatar lszomoru avatar vidhanio avatar dependabot[bot] avatar antar-ghuman avatar avasam avatar connorads avatar insilications avatar privet-kitty avatar jammf avatar jyothirmaikottu avatar posita avatar peterjclaw avatar samskiter avatar srilasya02 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.