Skip to content

Indenting try/except should not go to if statement #6963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DaMrNelson opened this issue Aug 13, 2019 · 1 comment
Closed

Indenting try/except should not go to if statement #6963

DaMrNelson opened this issue Aug 13, 2019 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@DaMrNelson
Copy link

Environment data

  • VS Code version: 1.37.0
  • Extension version: 2019.8.29288
  • OS and version: Ubuntu 18.04.3
  • Python version: 3.6.8
  • Type of virtual environment used: N/A
  • Relevant/affected Python packages and their versions:
  • Jedi or Language Server: python.jediEnabled is true

Expected behaviour

When trying except: it indents to the furthest open try:

Actual behaviour

Indents just below the furthest open block.
current

Steps to reproduce:

  1. Install Visual studio code and your extension
  2. Have a try statement, and a block after it.
  3. Type except:

Sample Code

class Test():
    def func(self):
        try:
            if True:
                if True:
                    print("hi")
        #except goes here

Logs

No related output from either source.

@DaMrNelson DaMrNelson added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Aug 13, 2019
@DaMrNelson DaMrNelson changed the title Indenting try/except should not if statement Indenting try/except should not go to if statement Aug 13, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Aug 14, 2019
@kimadeline
Copy link

Hi @DaMrNelson 👋 thank you for reporting this issue! This was caused by indentation changes we made (see #6886 ), which have been reverted since. Please update your extension to the latest version (2019.8.30787, released on August 13), thanks!

@ghost ghost removed the triage label Aug 14, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants