Documentation and issues for Pylance - Fast, feature-rich language support for Python

Overview

Pylance

Fast, feature-rich language support for Python

This repository is for providing feedback and documentation on the Pylance language server extension in Visual Studio Code. You can use the repository to report issues or submit feature requests. The Pylance codebase is not open-source but you can contribute to Pyright to make improvements to the core typing engine that powers the Pylance experience.

Pylance is the default language support for Python in Visual Studio Code and is shipped as part of that extension as an optional dependency.

Quick Start

  1. Install the Python extension from the marketplace. Pylance will be installed as an optional extension.
  2. Open a Python (.py) file and the Pylance extension will activate.

Note: If you've previously set a language server and want to try Pylance, make sure you've set "python.languageServer": "Default" or "Pylance" in your settings.json file using the text editor, or using the Settings Editor UI.

Features

Pylance provides some awesome features for Python 3, including:

  • Docstrings
  • Signature help, with type information
  • Parameter suggestions
  • Code completion
  • Auto-imports (as well as add and remove import code actions)
  • As-you-type reporting of code errors and warnings (diagnostics)
  • Code outline
  • Code navigation
  • Type checking mode
  • Native multi-root workspace support
  • IntelliCode compatibility
  • Jupyter Notebooks compatibility
  • Semantic highlighting

See the changelog for the latest release.

Settings and Customization

Pylance provides users with the ability to customize their Python language support via a host of settings which can either be placed in the settings.json file in your workspace, or edited through the Settings Editor UI.

  • pylance.insidersChannel

    • Used to control the insiders download channel.
    • Available values:
      • off (default)
      • daily
  • python.analysis.typeCheckingMode

    • Used to specify the level of type checking analysis performed.
    • Default: off
    • Available values:
      • off: No type checking analysis is conducted; unresolved imports/variables diagnostics are produced
      • basic: Non-type checking-related rules (all rules in off) + basic type checking rules
      • strict: All type checking rules at the highest severity of error (includes all rules in off and basic categories)
  • python.analysis.diagnosticMode

    • Used to allow a user to specify what files they want the language server to analyze to get problems flagged in their code.
    • Available values:
      • workspace
      • openFilesOnly (default)
  • python.analysis.stubPath

    • Used to allow a user to specify a path to a directory that contains custom type stubs. Each package's type stub file(s) are expected to be in its own subdirectory.
    • Default value: ./typings
  • python.analysis.autoSearchPaths

    • Used to automatically add search paths based on some predefined names (like src).
    • Available values:
      • true (default)
      • false
  • python.analysis.extraPaths

    • Used to specify extra search paths for import resolution. This replaces the old python.autoComplete.extraPaths setting.
    • Default value: empty array
  • python.analysis.diagnosticSeverityOverrides

    • Used to allow a user to override the severity levels for individual diagnostics should they desire.

    • Accepted severity values:

      • error (red squiggle)
      • warning (yellow squiggle)
      • information (blue squiggle)
      • none (disables the rule)
    • Available rule to use as keys can be found here

    • Example:

    {
        "python.analysis.diagnosticSeverityOverrides": {
            "reportUnboundVariable": "information",
            "reportImplicitStringConcatenation": "warning"
        }
    }
  • python.analysis.useLibraryCodeForTypes

    • Used to parse the source code for a package when a typestub is not found.
    • Accepted values:
      • true (default)
      • false
  • python.analysis.autoImportCompletions

    • Used to control the offering of auto-imports in completions.
    • Accepted values:
      • true (default)
      • false
  • python.analysis.completeFunctionParens

    • Add parentheses to function completions.
    • Accepted values:
      • true
      • false (default)

Semantic highlighting

Visual Studio Code uses TextMate grammars as the main tokenization engine. TextMate grammars work on a single file as input and break it up based on lexical rules expressed in regular expressions.

Semantic tokenization allows language servers to provide additional token information based on the language server's knowledge on how to resolve symbols in the context of a project. Themes can opt-in to use semantic tokens to improve and refine the syntax highlighting from grammars. The editor applies the highlighting from semantic tokens on top of the highlighting from grammars.

Here's an example of what semantic highlighting can add:

Without semantic highlighting:

 semantic highlighting disabled

With semantic highlighting:

 semantic highlighting enabled

Semantic colors can be customized in settings.json by associating the Pylance semantic token types and modifiers with the desired colors.

  • Semantic token types

    • class, enum
    • parameter, variable, property, enumMember
    • function, member
    • module
    • intrinsic
    • magicFunction (dunder methods)
    • selfParameter, clsParameter
  • Semantic token modifiers

    • declaration
    • readonly, static, abstract
    • async
    • typeHint, typeHintComment
    • decorator
    • builtin

The scope inspector tool allows you to explore what semantic tokens are present in a source file and what theme rules they match to.

Example of customizing semantic colors in settings.json:

{
    "editor.semanticTokenColorCustomizations": {
        "[One Dark Pro]": {
            // Apply to this theme only
            "enabled": true,
            "rules": {
                "magicFunction:python": "#ee0000",
                "function.declaration:python": "#990000",
                "*.decorator:python": "#0000dd",
                "*.typeHint:python": "#5500aa",
                "*.typeHintComment:python": "#aaaaaa"
            }
        }
    }
}

Troubleshooting

Known issues are documented in TROUBLESHOOTING.

Contributing

Pylance leverages Microsoft's open-source static type checking tool, Pyright, to provide performant language support for Python.

Code contributions are welcomed via the Pyright repo.

Pylance ships with a collection of type stubs for popular modules to provide fast and accurate auto-completions and type checking. Our type stubs are sourced from typeshed and our work-in-progress stub repository, microsoft/python-type-stubs. Type stubs in microsoft/python-type-stubs will be contributed back to typeshed or added inline to source packages once they are of high enough quality.

For information on getting started, refer to the CONTRIBUTING instructions.

Feedback

License

See LICENSE for more information.

Comments
  • Local imports not resolving correctly

    Local imports not resolving correctly

    Environment data

    • Language Server version: 2020.6.1
    • OS and version: Windows 10 Version 10.0.18363 Build 18363
    • Python version (& distribution if applicable, e.g. Anaconda): Python 3.8.2 32bit

    Expected behaviour

    When trying to import another python file from the same directory as the current file (e.g. main.py and emailRelay.py are in the same directory, and I am importing emailRelay.py into main.py), the import should not be linted unless file I am importing does not exist.

    Actual behaviour

    When trying to import another python file from the same directory as the current file (e.g. main.py and emailRelay.py are in the same directory, and I am importing emailRelay.py into main.py), Pylance lints it as an unresolved import

    enhancement needs investigation 
    opened by aaronsmith1234 82
  • Autocomplete suggestions not working for OpenCV built from source

    Autocomplete suggestions not working for OpenCV built from source

    Environment data

    VS Code version: 1.58.2 Extension version (available under the Extensions sidebar): v2021.7.5 OS: Darwin arm64 20.6.0 Python version (& distribution if applicable, e.g. Anaconda): 3.9.2 Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda Relevant/affected Python packages and their versions: OpenCV 4.5.3 Value of the python.languageServer setting: Pylance

    OpenCV 4.5.3 built from source and non-free packages, installed in:

    /Library/OpenCV/opencv-4.5.3/build/lib/python3
    /usr/local/lib/python3.9/site-packages/cv2/python-3.9
    

    Both paths is added to "python.analysis.extraPaths"

    "python.analysis.extraPaths": [
            "/Library/OpenCV/opencv-4.5.3/build/lib/python3",
            "/usr/local/lib/python3.9/site-packages/cv2/python-3.9"
        ],
    

    Expected behavior

    Autocomplete suggestions for module cv2 are expected. Autocomplete works in python.languageServer==Microsoft , so that proves nothing wrong with my installation of OpenCV.

    Actual behavior

    Autocomplete suggestions working fine with the Python default method.

    image

    But, not working with the OpenCV built from source

    image

    dynamic behavior 
    opened by mosdeo 61
  • Improved docstring display support

    Improved docstring display support

    Environment data

    VS Code version: 1.18 Python Extension version: 0.8.0 Python Version: 3.4 OS and version: Windows 10

    image

    There is currently very little support for python docstrings, at least using the reST format that we use in our project. Existing docstrings are displayed in the intellisense dialog, but the parameters aren't interpreted as parameters, meaning that there is no type inference being done off of the documentation.

    The two main things that would be helpful are:

    1. Recognize existing docstrings and defined parameters/types
    2. Include the ability to auto-generate docstrings, inferring types from the function signature when possible

    Thanks!

    triage-needed 
    opened by abgivant 50
  • 'module' is not Accessed Pylance(Pylance is greyed out)

    'module' is not Accessed Pylance(Pylance is greyed out)

    When I am importing the python module 'requests'. PyLance or VSCode underlines it with yellow meaning warning. It is also shown in the problems panel in the integrated terminal of vscode. Hope it gets fixed soon. I did not use the Bug Report Template because I am not sure if it is a bug. Refference Image or Screenshot

    needs investigation 
    opened by pybash1 47
  • Diagnostics broken for files created with `code new_file.py`

    Diagnostics broken for files created with `code new_file.py`

    Environment data

    Pylance: v2020.10.2

    • OS and version: MacOS 10.15.7
    • Python version (& distribution if applicable, e.g. Anaconda): Python 3.7.3

    Expected behaviour

    Recognise docstrings either """ or '''

    Actual behaviour

    Error:

    String literal is unterminated
    
    """
    Some text
    Input:
    
    Output
    [[A,B,1],
    [B,C,4],
    [C,E,1],
    [D,E,5]]
    """
    
    class Solution:
        def __init__(self):
            pass
        def get_result(self):
            pass
    
    Screenshot 2020-10-27 at 09 52 19 Screenshot 2020-10-27 at 09 44 17 Screenshot 2020-10-27 at 09 44 28 Screenshot 2020-10-27 at 09 45 16

    If remove the array in the docstring:

    Screenshot 2020-10-27 at 09 55 47 Screenshot 2020-10-27 at 09 55 56

    There's no indentation.

    If I type out the class Solution manually, Pylance stops complaining but that means I cannot use my VSCode snippets for other snippets.

    Python snippets:

        "Default solution": {
            "prefix": "mysolution",
            "body": [
                "class Solution:",
                "    def __init__(self):",
                "        pass",
                "    def get_result(self):",
                "        pass",
                ],
            "description": "My solution default setup"
    

    After pasting the output array back in the docstring, the error in the docstring goes away:

    Screenshot 2020-10-27 at 09 59 13 bug waiting for user response 
    opened by nguyendviet 43
  • Pylance stuck in endless loop, causing high CPU load

    Pylance stuck in endless loop, causing high CPU load

    Environment data

    • Language Server version: 2021.5.4
    • OS and version: arch-linux
    • Python version (& distribution if applicable, e.g. Anaconda): python 3.9.2 with pyenv

    Expected behaviour

    Pylance analyzes workspace once and stops (and saves results)

    Actual behaviour

    Pylance continues to analyze workspace over and over - causing high CPU load.

    this bug happens from time to time in my workspace (but not always - sometimes i start vscode, and it analyzes once and that's it, without any visible change). As it's not happening all the time, i don't think it's related to my environment / setup (Then it would have to happen every time ...).

    Unfortunately, it's a rather large project, which makes analyzing difficult.

    While looking at the logs below - searching for bybit will show it's happening 28 times. 9 times is normal for 1 run - then it starts to repeat.

    Logs

    [Info  - 8:59:40 PM] Pylance language server 2021.5.4 (pyright fd334302) starting
    [Info  - 8:59:40 PM] Server root directory: /home/xmatt/.vscode/extensions/ms-python.vscode-pylance-2021.5.4/dist
    [Info  - 8:59:40 PM] No configuration file found.
    [Info  - 8:59:40 PM] pyproject.toml file found at /home/xmatt/development/cryptos/freqtrade.
    [Info  - 8:59:40 PM] Loading pyproject.toml file at /home/xmatt/development/cryptos/freqtrade/pyproject.toml
    [Error - 8:59:40 PM] Pyproject file "/home/xmatt/development/cryptos/freqtrade/pyproject.toml" is missing "[tool.pyright] section.
    [Info  - 8:59:40 PM] Setting pythonPath for service "freqtrade": "/home/xmatt/.pyenv/versions/3.9.2/envs/trade_392/bin/python"
    [Warn  - 8:59:40 PM] stubPath /home/xmatt/development/cryptos/freqtrade/typings is not a valid directory.
    [Info  - 8:59:40 PM] Assuming Python version 3.9
    [Info  - 8:59:40 PM] Assuming Python platform Linux
    Search paths for /home/xmatt/development/cryptos/freqtrade
      /home/xmatt/.vscode/extensions/ms-python.vscode-pylance-2021.5.4/dist/typeshed-fallback/stdlib
      /home/xmatt/development/cryptos/freqtrade
      /home/xmatt/development/cryptos/freqtrade/typings
      /home/xmatt/.vscode/extensions/ms-python.vscode-pylance-2021.5.4/dist/typeshed-fallback/stubs/...
      /home/xmatt/.vscode/extensions/ms-python.vscode-pylance-2021.5.4/dist/bundled/stubs
      /home/xmatt/.pyenv/versions/3.9.2/lib/python3.9
      /home/xmatt/.pyenv/versions/3.9.2/lib/python3.9/lib-dynload
      /home/xmatt/.pyenv/versions/3.9.2/envs/trade_392/lib/python3.9/site-packages
      /home/xmatt/development/cryptos/freqtrade
    [Error - 8:59:41 PM] Exception received when installing recursive file system watcher
    [Info  - 8:59:41 PM] Searching for source files
    [Info  - 8:59:41 PM] Found 200 source files
    [Info  - 8:59:41 PM] Background analysis(1) root directory: /home/xmatt/.vscode/extensions/ms-python.vscode-pylance-2021.5.4/dist
    ...
    

    (full log in attachement)

    pylance_debug.log

    fixed in next version needs investigation 
    opened by xmatthias 42
  • Import

    Import "[module]" could not be resolvedPylance (reportMissingImports)

    I am learning a Python book, so I created folder for each chapter to storage code. Working directory is as follows:

    book
      └─chapter1
          ├─a.py
          └─b.py
    

    b.py

    import a
    

    When I "open by code" in "book" folder, the Yellow wavy line is below the code "import a".

    Import "a" could not be resolved
    

    However, module "a" is really imported and it works well. If I delete "python.languageServer": "Pylance" and use Jedi, yellow wavy line won't show up.

    In addition, if i "open by code" in "chapter1" folder, yellow wavy line won't show up.

    The Yellow wavy line doesn't have any effect, but it's a nuisance. Is this a normal reminder? If the answer is Yes, please ignore my question.

    waiting for user response 
    opened by jiangzhuochi 41
  • Rename symbol: No result

    Rename symbol: No result

    Environment data

    • Language Server version: Pylance language server 2020.9.6 (pyright c52b78aa)
    • OS and version: macOS
    • Python version (& distribution if applicable, e.g. Anaconda): 3.6.9

    Expected behaviour

    Renaming a function argument renames its usage within the function

    Actual behaviour

    No result

    Logs

    XXX
    

    Code Snippet / Additional information

    def go(foo: str) -> str:
        return foo
    

    recording

    waiting for upstream 
    opened by tekumara 40
  • Auto-import doesn't work

    Auto-import doesn't work

    Environment data

    • Language Server version: 2020.6.1
    • OS and version: macOS Mojave 10.14.6
    • Python version: 3.8.2, installed via pyenv.

    Expected behaviour

    As demonstrated in the in Pylance announcement, I want to be able to automatically import packages as I type.

    • I type "gc" and make a short pause
    • VSCode shows the tooltip, inviting me to import gc
    • I choose the library from the popup window
    • VSCode adds an import to the top of the file

    Actual behaviour

    • I type "gc" and make a pause
    • Nothing happens

    Logs

    Logs output
    [Info  - 11:15:42 AM] Pylance language server 2020.6.1 starting
    [Info  - 11:15:42 AM] Server root directory: /Users/roman/.vscode/extensions/ms-python.vscode-pylance-2020.6.1/server
    [Info  - 11:15:42 AM] No configuration file found.
    [Info  - 11:15:42 AM] Setting pythonPath for service "vscode-playground": "/Users/roman/workspace/vscode-playground/env/bin/python3"
    [Info  - 11:15:42 AM] stubPath /Users/roman/workspace/vscode-playground/typings is not a valid directory.
    [Info  - 11:15:42 AM] Assuming Python version 3.8
    [Info  - 11:15:42 AM] Assuming Python platform Darwin
    [Info  - 11:15:42 AM] Searching for source files
    [Info  - 11:15:42 AM] Auto-excluding /Users/roman/workspace/vscode-playground/env
    [Info  - 11:15:42 AM] Found 1 source file
    [FG] parsing: /Users/roman/workspace/vscode-playground/foo.py (7ms)
    [FG] parsing: /Users/roman/.vscode/extensions/ms-python.vscode-pylance-2020.6.1/server/typeshed-fallback/stdlib/2and3/builtins.pyi (245ms)
    [FG] binding: /Users/roman/.vscode/extensions/ms-python.vscode-pylance-2020.6.1/server/typeshed-fallback/stdlib/2and3/builtins.pyi (95ms)
    [FG] binding: /Users/roman/workspace/vscode-playground/foo.py (0ms)
    [Info  - 11:15:42 AM] Background analysis root directory: /Users/roman/.vscode/extensions/ms-python.vscode-pylance-2020.6.1/server
    [Info  - 11:15:42 AM] Background analysis started
    [BG] analyzing: /Users/roman/workspace/vscode-playground/foo.py ...
    [BG]   parsing: /Users/roman/workspace/vscode-playground/foo.py (41ms)
    [BG]   parsing: /Users/roman/.vscode/extensions/ms-python.vscode-pylance-2020.6.1/server/typeshed-fallback/stdlib/2and3/builtins.pyi (246ms)
    [BG]   binding: /Users/roman/.vscode/extensions/ms-python.vscode-pylance-2020.6.1/server/typeshed-fallback/stdlib/2and3/builtins.pyi (106ms)
    [BG]   binding: /Users/roman/workspace/vscode-playground/foo.py (0ms)
    [BG]   checking: /Users/roman/workspace/vscode-playground/foo.py (2ms)
    [BG] analyzing: /Users/roman/workspace/vscode-playground/foo.py (396ms)
    [FG] parsing: /Users/roman/workspace/vscode-playground/foo.py (3ms)
    [FG] binding: /Users/roman/workspace/vscode-playground/foo.py (3ms)
    [BG] analyzing: /Users/roman/workspace/vscode-playground/foo.py ...
    [BG]   parsing: /Users/roman/workspace/vscode-playground/foo.py (2ms)
    [BG]   binding: /Users/roman/workspace/vscode-playground/foo.py (0ms)
    [BG]   checking: /Users/roman/workspace/vscode-playground/foo.py (0ms)
    [BG] analyzing: /Users/roman/workspace/vscode-playground/foo.py (3ms)
    [FG] parsing: /Users/roman/workspace/vscode-playground/foo.py (1ms)
    [FG] binding: /Users/roman/workspace/vscode-playground/foo.py (0ms)
    [BG] analyzing: /Users/roman/workspace/vscode-playground/foo.py ...
    [BG]   parsing: /Users/roman/workspace/vscode-playground/foo.py (1ms)
    [BG]   binding: /Users/roman/workspace/vscode-playground/foo.py (0ms)
    [BG]   checking: /Users/roman/workspace/vscode-playground/foo.py (2ms)
    [BG] analyzing: /Users/roman/workspace/vscode-playground/foo.py (3ms)
    

    Code Snippet / Additional information

    vscode

    enhancement fixed in next version needs spec 
    opened by imankulov 40
  • Goto definition goes to stub files instead of actual definitions

    Goto definition goes to stub files instead of actual definitions

    Expected behaviour

    Goto definition goes to actual code even if types are defined in a stub file

    Actual behaviour

    Goto definition goes to stub files instead of actual code

    Code Snippet / Additional information

    from http import HTTPStatus
    
    print(HTTPStatus.GATEWAY_TIMEOUT)
    

    Try goto definition (F12) on either HTTPStatus in line 1 or GATEWAY_TIMEOUT in line 3

    enhancement fixed in next version 
    opened by jahan01 38
  • Outline says No Symbols Found for the current doc. start type and symbols appear

    Outline says No Symbols Found for the current doc. start type and symbols appear

    Originally opened as microsoft/vscode-python#2434 , which was closed as duplicate of microsoft/vscode-python#2334

    I updated to 1.27.1 this am to get the fix for microsoft/vscode-python#2334

    I opened existing file that had problem before. Same problem as 2334. Hit space and symbols appear.

    Cut and paste all code from that file to new file, saved and closed new file. On open of new file, symbols appear. On Open of old file with identical code no symbols until hit space.

    Environment data

    VS Code version: 1.27.1 Extension version (available under the Extensions sidebar): 2018.8.0 OS and version: Ubuntu 16.04.3 Python version (& distribution if applicable, e.g. Anaconda): 3.5.2 Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A Relevant/affected Python packages and their versions: N/A

    Actual behavior

    Outline view does not display any symbols after file open. Outline view shows 'No symbols found in document xxx'. On editing the file symbols appear in couple of seconds

    Expected behavior

    Symbols appear in outline window after opening file

    Steps to reproduce:

    Open file

    Logs

    None

    Original file image

    New file with same code image

    duplicate 
    opened by atomlin 37
  • Add more fine-grained code action kinds for `refactor.extract`

    Add more fine-grained code action kinds for `refactor.extract`

    Currently, both the Extract method and Extract variable refactoring quick actions have the code action kind refactor.extract, which makes it impossible to target the one that you want directly. It would be great for them each to have their own more specific code action kinds, similar to Typescript's refactor.extract.constant and refactor.extract.function

    In addition, it would be great to have preferred: true on them

    waiting for user response 
    opened by pokey 2
  • Issue with code being displayed darkly in Visual Studio Code

    Issue with code being displayed darkly in Visual Studio Code

    Type: Bug

    Since the update a couple of months ago In Visual Studio Code, while editing Python code, the    from selenium import webdriver  wd = webdriver.Chrome(***,***)  aaa = 0

    If you write like this (the brackets in Chrome are optional), the code after aaa=0 is displayed darker than usual.

     webdriver.Chrome() → webdriver.Chrome

    and remove the parentheses, the code will be displayed as usual without being darkened. This happens both in JupyterNotebook and in the normal editor state. It is not particularly urgent, but it is very difficult to see. Please fix it if you can.

    VS Code version: Code 1.74.2 (e8a3071ea4344d9d48ef8a4df2c097372b0c5161, 2022-12-20T10:29:14.590Z) OS version: Windows_NT x64 10.0.19045 Modes: Sandboxed: No

    waiting for user response 
    opened by Nyanprari 1
  • (Python)

    (Python) "Find All References" on any __init__ shows every constructor for every class

    Python extension installed and nothing else.

    I am evaluating VS Code as an alternative to Pycharm for a professional codebase because PyCharm is generally slow and I do not like the git support as much. We are not a software development shop, so we don't need a lot of fancy features, just usability in our ~500k line code base.

    I have noticed several problems so far, but the biggest one is how VS Code finds references. Sometimes it shows fewer references than are actually in the code. Sometimes, many more, where it fails to distinguish between the same name function in different classes. See this extreme case below. Why is this happening?

    Here is a toy workspace with main.py, class_a.py, and class_b.py to show the issue. I right click on init of either ClassA or ClassB, and select "Find All References" and get 3 results in 3 files. PyCharm correctly shows that there's only one instance of init, and that's in main.py

    image

    needs investigation 
    opened by xxc-zsz 1
  • Cannot suppress Pylance diagnostic errors in Python library files when try to set up configuration options

    Cannot suppress Pylance diagnostic errors in Python library files when try to set up configuration options

    Environment data

    • Language Server version: 2022.12.20 (pyright 621d886b)
    • OS and version: macOS 10.15.7, Windows 22H2
    • Python version: 3.11 (official distribution from python.org)

    Repro Steps

    1. Open empty folder (project root)
    2. Create 1 file:
      • ./pyproject.toml
        [tool.pyright]
        typeCheckingMode = "strict"
        
    3. Navigate to .py / .pyi file from the Python Standard Library folder (tested with typing.py) or Pylance's typeshed stubs directory (tested with builtins.pyi)

    Note: I've tried to add the absolute path of my Python Standard Library directory to the next settings: "python.analysis.exclude" / "python.analysis.ignore" from language server settings, "exclude" / "ignore" fields from pyright config options. As I understand, "python.analysis.ignore" is that what I need. But it does not work. None of these settings affect the situation. The issue is only fixed when I delete or rename pyproject.toml file. But in this case I can't set up Pyright configuration.

    There is the same issue if you try to use pyrightconfig.json instead of pyproject.toml.

    Expected behavior

    I want to see Python library files without diagnostic output (errors and warnings) in "strict"/"basic" type checking mode and have the ability to tune Pylance/Pyright configuration.

    Actual behavior

    Type checking errors: macOS

    Logs

    vscode-macos.txt

    needs investigation 
    opened by ivanzemskiy 5
  • feature request: auto-imports: exclude some modules from auto-import suggestion

    feature request: auto-imports: exclude some modules from auto-import suggestion

    I have pyparsing module as an indirect dependency, but since it has many classes whose names are as same as the ones in typing module (e.g. Optional, ), I experience wrong imports too many...

    image

    It would be helpful to have something like "module blocklist" to hide or make priority lower for suggestions from specific modules.

    Repro

    1. enable indexing and auto import:
    "python.analysis.autoImportCompletions": true,
    "python.analysis.indexing": true
    
    1. install pyparsing: pip install pyparsing
    2. Type Optional and see suggestions
    enhancement 
    opened by sarisia 0
Releases(2023.1.11)
Owner
Microsoft
Open source projects and samples from Microsoft
Microsoft
API Documentation for Python Projects

API Documentation for Python Projects. Example pdoc -o ./html pdoc generates this website: pdoc.dev/docs. Installation pip install pdoc pdoc is compat

mitmproxy 1.4k Jan 7, 2023
Run `black` on python code blocks in documentation files

blacken-docs Run black on python code blocks in documentation files. install pip install blacken-docs usage blacken-docs provides a single executable

Anthony Sottile 460 Dec 23, 2022
📖 Generate markdown API documentation from Google-style Python docstring. The lazy alternative to Sphinx.

lazydocs Generate markdown API documentation for Google-style Python docstring. Getting Started • Features • Documentation • Support • Contribution •

Machine Learning Tooling 118 Dec 31, 2022
Watch a Sphinx directory and rebuild the documentation when a change is detected. Also includes a livereload enabled web server.

sphinx-autobuild Rebuild Sphinx documentation on changes, with live-reload in the browser. Installation sphinx-autobuild is available on PyPI. It can

Executable Books 440 Jan 6, 2023
Documentation generator for C++ based on Doxygen and mosra/m.css.

mosra/m.css is a Doxygen-based documentation generator that significantly improves on Doxygen's default output by controlling some of Doxygen's more unruly options, supplying it's own slick HTML+CSS generation and adding a fantastic live search feature.

Mark Gillard 109 Dec 7, 2022
Automated Integration Testing and Live Documentation for your API

Automated Integration Testing and Live Documentation for your API

ScanAPI 1.3k Dec 30, 2022
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

Introduction Swagger UI allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources without

Swagger 23.2k Dec 29, 2022
Main repository for the Sphinx documentation builder

Sphinx Sphinx is a tool that makes it easy to create intelligent and beautiful documentation for Python projects (or other documents consisting of mul

null 5.1k Jan 2, 2023
Literate-style documentation generator.

888888b. 888 Y88b 888 888 888 d88P 888 888 .d8888b .d8888b .d88b. 8888888P" 888 888 d88P" d88P" d88""88b 888 888 888

Pycco 808 Dec 27, 2022
Main repository for the Sphinx documentation builder

Sphinx Sphinx is a tool that makes it easy to create intelligent and beautiful documentation for Python projects (or other documents consisting of mul

null 5.1k Jan 4, 2023
Project documentation with Markdown.

MkDocs Project documentation with Markdown. View the MkDocs documentation. Project release notes. Visit the MkDocs wiki for community resources, inclu

MkDocs 15.6k Jan 2, 2023
Your Project with Great Documentation.

Read Latest Documentation - Browse GitHub Code Repository The only thing worse than documentation never written, is documentation written but never di

Timothy Edmund Crosley 809 Dec 28, 2022
:blue_book: Automatic documentation from sources, for MkDocs.

mkdocstrings Automatic documentation from sources, for MkDocs. Features Python handler features Requirements Installation Quick usage Features Languag

Timothée Mazzucotelli 1.1k Dec 31, 2022
:blue_book: Automatic documentation from sources, for MkDocs.

mkdocstrings Automatic documentation from sources, for MkDocs. Features - Python handler - Requirements - Installation - Quick usage Features Language

null 1.1k Jan 4, 2023
Seamlessly integrate pydantic models in your Sphinx documentation.

Seamlessly integrate pydantic models in your Sphinx documentation.

Franz Wöllert 71 Dec 26, 2022
NetBox plugin for BGP related objects documentation

Netbox BGP Plugin Netbox plugin for BGP related objects documentation. Compatibility This plugin in compatible with NetBox 2.10 and later. Installatio

Nikolay Yuzefovich 133 Dec 27, 2022
Documentation of the QR code found on new Austrian ID cards.

Austrian ID Card QR Code This document aims to be a complete documentation of the format used in the QR area on the back of new Austrian ID cards (Per

Gabriel Huber 9 Dec 12, 2022
Swagger Documentation Generator for Django REST Framework: deprecated

Django REST Swagger: deprecated (2019-06-04) This project is no longer being maintained. Please consider drf-yasg as an alternative/successor. I haven

Marc Gibbons 2.6k Jan 3, 2023
Test utility for validating OpenAPI documentation

DRF OpenAPI Tester This is a test utility to validate DRF Test Responses against OpenAPI 2 and 3 schema. It has built-in support for: OpenAPI 2/3 yaml

snok 106 Jan 5, 2023