Skip to content

Snippets do not work for Python #15220

@mikemadden42

Description

@mikemadden42

Environment data

  • VS Code version: 1.52.1
  • Extension version (available under the Extensions sidebar): v2021.1.502429796
  • OS and version: macOS 11.1
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.1, homebrew
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: N/A
  • Relevant/affected Python-related VS Code extensions and their versions: N/A
  • Value of the python.languageServer setting: Jedi

[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]

Expected behaviour

Code Snippets do not work for Python. This has worked for me before.

Actual behaviour

For example, if I type the def keyword, code normally snows a popup to insert a snippet which contains a basic definition of a Python function. The snippet for the function no longer works. The def keyword is entered and the snippet is not created.

Screen Shot 2021-01-24 at 14 19 48

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

Here is an example with the for keyword. Normally, I would see a popup for several types of for statements. This is no longer working.

Screen Shot 2021-01-24 at 16 48 39

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

No text output is displayed.

Screen Shot 2021-01-25 at 06 23 43

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions