You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indentated comments have inconvenient behaviour with jupyter lab comment and uncomment function. Lab adds the # at the start of the line and black adds spaces to match indentation, uncommenting in lab just removes the # and the code is now floating with extra indentation.
E.g., I have a function
def fun(x):
"""function adds 1"""
x += 1
x *= 1
return x
and I comment the third line with ctrl+/
def fun(x):
"""function adds 1"""
x += 1
# x *= 1
return x
executing with black enabled will make it look like:
def fun(x):
"""function adds 1"""
x += 1
# x *= 1
return x
Then uncommenting with ctrl+/ again yields:
def fun(x):
"""function adds 1"""
x += 1
x *= 1
return x
Indentated comments have inconvenient behaviour with jupyter lab comment and uncomment function. Lab adds the # at the start of the line and black adds spaces to match indentation, uncommenting in lab just removes the # and the code is now floating with extra indentation.
E.g., I have a function
and I comment the third line with ctrl+/
executing with black enabled will make it look like:
Then uncommenting with ctrl+/ again yields:
Related: jupyterlab/jupyterlab#6957
The text was updated successfully, but these errors were encountered: