question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docstring do not appear when editing cell

See original GitHub issue

Environment data

  • VS Code Insiders: 1.56.0-insider 550035808407c15252e581e8abe1b820b9d311ee x64
  • Jupyter Extension version (available under the Extensions sidebar): 2021.6.718745073
  • Python Extension version (available under the Extensions sidebar): 2021.3.680753044
  • OS (Windows | Mac | Linux distro) and version: Windows10
  • Python and/or Anaconda version: 3.9.2
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
  • Jupyter server running: Remote

Actual behaviour

Docstring do not appear when editing a cell. However inside the import cell, docstring appears.

For instance if I have two cells like:

import networkx as nx

and

nx.Graph()

Docstring won’t appear

However if I have:

import networkx as nx
nx.Graph()

Then it appears

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
canersnlicommented, Apr 7, 2021

I got same even worse issue.

Pylance autocomplete doesn’t work. It works like jupyter autocomplete. 2021-04-08_01h02_07

Even if I import library and run in the the same cell , still nor at the end of typing pop-up documentation neither hover pop-up documentation works. 2021-04-08_01h02_31 2021-04-08_01h03_01

  • VS Code Insiders: 1.56.0-insider (user setup) Commit: bb90ba3d5a5f8d114045b045f3bbe1ebc404f54a
  • Jupyter Extension version : v2021.6.723987413
  • Python Extension version : v2021.4.690665134-dev
  • OS (Windows | Mac | Linux distro) and version: Windows10
  • Python and/or Anaconda version: 3.7.10
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
  • Jupyter server running: local
  • Microsoft Language Server: Pylance v2021.3.4

I had opened #4218 topic 4 months ago, unfortunately it still has not been solved. Now I got stuck in older VSCode version 1.51 which has some strange bugs either.

0reactions
floriandonhausercommented, Apr 23, 2021

@rchiodo

On top of that, Pylance seems to work better than Jedi. Are you using Jedi or Pylance?

Installing Pylance fixed it for me, thank you a lot! Before with Jedi, I think autocomplete was behaving like normal jupyter notebook (pretty bad recommendations imo). The workspace was not the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spyder doesn't display docstring when using @property ...
Show activity on this post. Using Ctrl + i in Spyder generally displays the docstring for the object the cursor is at, but...
Read more >
Python Docstrings Tutorial : Examples & Format for Pydoc ...
Run and edit the code from this tutorial online. Open Workspace. If you are just getting started in Python and would like to...
Read more >
Python Docstring: Documenting And Introspecting Functions
This tutorial explains what is Python Docstring and how to use it to document Python functions with examples.
Read more >
missing-function-docstring / C0116 - Pylint 2.16.0-dev ...
Description: Used when a function or method has no docstring. Some special methods like __init__ do not require a docstring. Problematic code:.
Read more >
15 Tips and Tricks for Jupyter Notebook that will ease your ...
Sometimes the code snippet in a jupyter notebook cell is not ... Jupyter Notebook can show that documentation of the function you are ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found