Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terminal: smart send not working when returning dict #24606

Open
hutch3232 opened this issue Dec 15, 2024 · 1 comment
Open

terminal: smart send not working when returning dict #24606

hutch3232 opened this issue Dec 15, 2024 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug needs spike Label for issues that need investigation before they can be worked on.

Comments

@hutch3232
Copy link

hutch3232 commented Dec 15, 2024

Type: Bug

Behaviour

Function definitions that return a list or dict directly don't fully send to terminal unless it's surrounded by parentheses.

Steps to reproduce:

Start with this script:

def foo():
    return {
        "a": 1
    }


def bar():
    return {"a": 1}

# this line works on python <= 3.12.8
# BUT throws an indentation error on python 3.13.1
def baz():
    d = {"a": 1}
    return d


def bar2():
    return ({"a": 1})

Ensure Smart Send is on and that Native REPL is OFF. Then use shift+enter to try and run each function definition.

Image
Image
Image
Image

Diagnostic data

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

XXX

Extension version: 2024.23.2024121301
VS Code version: Code 1.96.0 (138f619c86f1199955d53b4166bef66ef252935c, 2024-12-11T02:29:09.626Z)
OS version: Windows_NT x64 10.0.26100
Modes:

  • Python version (& distribution if applicable, e.g. Anaconda): 3.11.11
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Unknown
  • Value of the python.languageServer setting: Default
User Settings


languageServer: "Pylance"

Installed Extensions
Extension Name Extension Id Version
debugpy ms- 2024.14.0
EditorConfig Edi 0.16.4
js-debug ms- 1.96.0
js-debug-companion ms- 1.1.3
prettier-vscode esb 11.0.0
python ms- 2024.23.2024121301
remote-containers ms- 0.394.0
remote-explorer ms- 0.4.3
remote-server ms- 1.5.2
remote-ssh ms- 0.116.0
remote-ssh-edit ms- 0.87.0
remote-wsl ms- 0.88.5
ruff cha 2024.56.0
vscode-docker ms- 1.29.3
vscode-eslint dba 3.0.10
vscode-js-profile-table ms- 1.0.10
vscode-pylance ms- 2024.12.1
vscode-remote-extensionpack ms- 0.26.0
System Info
Item Value
CPUs Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz (8 x 1800)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 7.89GB (1.75GB free)
Process Argv --crash-reporter-id 9e3ddfb7-a2e0-4286-9dec-d46feda300f1
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyonecf:30548226
962ge761:30959799
pythongtdpath:30769146
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
9c06g630:31013171
dvdeprecation:31068756
dwnewjupyter:31046869
impr_priority:31102340
nativerepl1:31139838
refactort:31108082
pythonrstrctxt:31112756
cf971741:31144450
iacca1:31171482
notype1cf:31157160
5fd0e150:31155592
dwcopilot:31170013

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Dec 15, 2024
@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug needs spike Label for issues that need investigation before they can be worked on. and removed triage-needed Needs assignment to the proper sub-team labels Dec 15, 2024
@karthiknadig
Copy link
Member

Thanks for including repro details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug needs spike Label for issues that need investigation before they can be worked on.
Projects
None yet
Development

No branches or pull requests

3 participants