UCSD-PL / vscode

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

PB position issue when docstring has an empty line at the end #27

Closed rlisahuang closed 1 year ago

rlisahuang commented 1 year ago

To replicate:

import itertools
import matplotlib.pyplot as plt

"""
one line

"""

data = [180,250,130,50]

fig, ax = plt.subplots()

# plot the data using a bar chart with different colors on each bar
## ---
ax.bar(range(len(data)), data, color=['#FF0000','#00FF00','#0000FF','#FFFF00'])

# add a title and a label for the y axis
ax.set_title('Data')
ax.set_ylabel('Value')

# add a label for each bar
ax.set_xticks(range(len(data)))
ax.set_xticklabels(['A','B','C','D'])

# add a grid
ax.grid(True)

# show the plot
## ---
rlisahuang commented 1 year ago

More bugs exposed by docstrings (even without an empty line at the end). Need to look into this more.

rlisahuang commented 1 year ago

Two bugs exposed by this example:

rlisahuang commented 1 year ago

Creating a separate issue for the PB positioning bug with long comments.

rlisahuang commented 1 year ago

Fixed in #29