[Python] VSCode adding a single space to my auto-indents

Discussão em 'Python' iniciado por Stack, Fevereiro 19, 2025.

  1. Stack

    Stack Membro Participativo

    For the last day, whenever I make a new line, VSCode adds a single space to the auto-indent. Currently my auto indent with spaces is 4 but it adds a space at the end to make it 5. I'm not sure what caused it as I was in the middle of coding something when it suddenly started happening and its been happening ever since for every new line Normally with an auto indent of 4 spaces if you were to define a function it would look like

    def function1(self):
    return x


    But for some reason it has been adding exactly one space to most indents to make it look like

    def function1(self):
    return x


    with an extra space before return. It's been doing this for basically any indents (def function indents, loop indents, etc) and I don't know how to fix this. I am opening code from Github desktop app onto vscode if that is helpful. Any solutions?

    Continue reading...

Compartilhe esta Página