writer icon indicating copy to clipboard operation
writer copied to clipboard

Python documentation isn't inserted in the right area

Open boba-and-beer opened this issue 3 years ago • 2 comments

Python documentation is always inserted after the first line and not in the correct position. This can be a problem especially when using popular formatting tools such as black. For example:

def sample_function(
    value: int,
    text: str
):
    return value + 1

Would be inserted incorrectly.

This is happening on MacOS12 with Apple M1 chip in VSCode.

boba-and-beer avatar May 19 '22 09:05 boba-and-beer

Same is happening on Apple M1 chip on PyCharm.

enzorc avatar Jul 05 '22 08:07 enzorc

I have a MacBook as well but on Intel, not sure platform is the problem. I see this incorrect placement problem on both VSCode and PyCharm.

Things that trip it up are multi-line function arguments (cutting off that later lines) and also function decorators (inserting after the decorator instead of before the body).

glentner avatar Aug 11 '22 19:08 glentner