Vscode-jupyter: (Type hint) linting and formatting does not work in Jupyter Notebook

Created on 20 Jul 2020  路  1Comment  路  Source: microsoft/vscode-jupyter

Bug: Notebook Editor, Interactive Window, Editor cells

Steps to cause the bug to occur

  1. Enable mypy in VS Code workspace settings
  2. Set black as linter (install as dev-dependency with pipenv)
  3. Create new blank jupyter notebook + create function with type hints
  4. Call function with a mismatching type in arguments
  5. Save unformatted notebook

Actual behavior

  • Linter mypy does not indicate an error
  • Black does not format unformatted cell in notebook

Expected behavior

  • Linter (mypy) displays a type error
  • Formatter (black) does not format unformatted cell in notebook

Could not find a similair issue, hope I did not overlook an existing one. Love the python extension btw!

Your Jupyter and/or Python environment

_Please provide as much info as you readily know_

  • Jupyter server running: Local
  • Extension version: v2020.7.94776
  • VS Code version: 1.47.2
  • Setting python.jediEnabled: false
  • Setting python.languageServer: Microsoft
  • Python and/or Anaconda version: 3.8.4 (installed from Homebrew)
  • OS: Mac OS 10.15.5 (19F101)
  • Virtual environment: pipenv

Developer Tools Console Output

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl

bug

Most helpful comment

Hi @danlutz! As mentioned in microsoft/vscode-python#12149, right now we don't have support for formatting of cells because of how our editor is implemented. We are releasing a new notebook editing experience which will include support for formatting notebook cells and linting. You can track progress here: https://github.com/microsoft/vscode-python/issues/12189.

We're also releasing a preview of the new notebook experience in the Insiders edition of VS Code this week. We look forward to your feedback, and thanks for your support :)

>All comments

Hi @danlutz! As mentioned in microsoft/vscode-python#12149, right now we don't have support for formatting of cells because of how our editor is implemented. We are releasing a new notebook editing experience which will include support for formatting notebook cells and linting. You can track progress here: https://github.com/microsoft/vscode-python/issues/12189.

We're also releasing a preview of the new notebook experience in the Insiders edition of VS Code this week. We look forward to your feedback, and thanks for your support :)

Was this page helpful?
0 / 5 - 0 ratings