UCSD-PL / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
0 stars 7 forks source link

Weird positioning of projection boxes #24

Closed rlisahuang closed 1 year ago

rlisahuang commented 1 year ago

To replicate, paste the following code into the web editor:

import numpy as np
"""
String Compression:
    Implement a method for basic string
    compression, using the count of
    repeated characters. You can assume
    that the string is non-empty, and
    only contains alphabetic characters.
    >>> task('aabccca')
    '2a1b3c1a'
"""

def task(s):
    rs = ''

    return rs

a = np.array([1,2,3])
b = 20

You will get:

Screenshot 2023-02-21 at 9 51 41 AM
rlisahuang commented 1 year ago

Removing the import statement solves the issue. Seems like the bug has to do with imports.

rlisahuang commented 1 year ago
import numpy as np

def task(s):
    rs = ''

    return rs

a = np.array([1,2,3])
b = 20

This solves the issue. So the bug really has to do with the import + docstring combo.

rlisahuang commented 1 year ago

Fixed in 3a1ea90c8804c812aa6404fd6fcb88610aa5d097.