[Python] VS Code Python code folding does not work as expected

Discussão em 'Python' iniciado por Stack, Julho 24, 2025.

  1. Stack

    Stack Membro Participativo

    Using Python in VS Code, code folding does not work as expected. It frequently misses adding folding symbols at various locations. See below example where both __init__ and _collect_playbooks are missing folding symbols. At the same time there are folding symbols on empty lines.

    Folding strategy is set to auto but setting it to indentation also does not help.

    Any idea or similar experience?

    [​IMG]

    Using VS Code v1.101.1 with Python 3.12.3 and following extensions:

    • Pylance v2025.6.2
    • Pylint v2025.2.0
    • Python v2025.10.0
    • Python debugger v2025.10.0
    • Ruff v2025.24.0

    Continue reading...

Compartilhe esta Página