Skip to content

This is the JSON schema for "mypy" ([tool.mypy]) specifically designed for the pyproject.toml file.

License

Notifications You must be signed in to change notification settings

yaegassy/mypy-json-schema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mypy-json-schema

Overview

This is the JSON schema for "mypy" ([tool.mypy]) specifically designed for the pyproject.toml file.

We have configured it to reference the JSON schema for mypy in this repository based on the pyproject.json in the Schema Store.

DEMO

mypy-json-schema-demo.mp4

Usage

Editor Integration

Please install the TOML language server called taplo.

You can also download the binary built from the GitHub Releases page, Please download the file with "full" in its name, such as taplo-full-darwin-aarch64.gz.

Please create a configuration for evenBetterToml.schema.associations and set it to reference the schema for pyproject.toml from this repository's pyproject.json.

Here is an example of a configuration for the language client I am using. Please adapt it to your environment.

{
  "languageserver": {
    "taplo": {
      "command": "taplo",
      "args": ["lsp", "stdio"],
      "filetypes": ["toml"],
      "settings": {
        "evenBetterToml": {
          "schema": {
            "associations": {
              "^(.*(/|\\\\)\\.?pyproject\\.toml|\\.?pyproject\\.toml)$": "https://raw.githubusercontent.com/yaegassy/mypy-json-schema/master/schemas/pyproject.json"
            }
          }
        }
      }
    }
  }
}

License

MIT

About

This is the JSON schema for "mypy" ([tool.mypy]) specifically designed for the pyproject.toml file.

Topics

Resources

License

Stars

Watchers

Forks