Variable explorer displays functions with a leading underscore

Open
#1,072 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
jupyter, python
Domain
devtools

Research direction

Start by tracing the inspectVariables request and the debugger's variable explorer panel, using the provided Python reproduction to compare how _abc and abc are displayed. Done means the variable panel handles both functions consistently with the reported expected behavior, with a regression test covering the reproduction.

Written by the indexing model from the issue text.

Description

The inspectVariables request and the variable explorer panel in the debugger seems to display functions with a leading underscore.

Here's a simple repro

def _abc():
    return "Hello"

def abc():
    return "Hello"

In the above code snippet, _abc will appear in the "Variables" panel whereas abc will not, as demonstrated below

SCR-20230105-nlp

Dominant language
Python
Stars
734
Forks
411
Avg merge
1d 2h
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ipython/ipykernel

All issues in ipython/ipykernel

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.