Skip to content

No auto indentation after colon when using slicing #1797

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
charlesastaylor opened this issue May 30, 2018 · 3 comments
Closed

No auto indentation after colon when using slicing #1797

charlesastaylor opened this issue May 30, 2018 · 3 comments
Labels
area-formatting bug Issue identified by VS Code Team member as probable bug

Comments

@charlesastaylor
Copy link

charlesastaylor commented May 30, 2018

Environment data

  • VS Code version: 1.23.1
  • Extension version: 2018.4.0
  • OS and version: Ubuntu 18.04
  • Python version: 3.6.5
  • Type of virtual environment used: N/A
  • Relevant/affected Python packages and their versions: N/A

Actual behaviour

No auto indentation when starting a new line after a statement that ends in a colon (eg if, while, for etc) if the statement contains any slicing.

Expected behaviour

Indentation after creating a new line following a semi colon regardless of any other semi colons used in statement.

Steps to reproduce:

  1. Type if my_list[:]:
  2. Press enter
  3. -> No indentation
@brettcannon brettcannon changed the title No auto indentation after semi colon when using slicing No auto indentation after colon when using slicing May 30, 2018
@brettcannon brettcannon added bug Issue identified by VS Code Team member as probable bug needs verification area-formatting labels May 30, 2018
@Arpitx
Copy link

Arpitx commented May 31, 2018

Experiencing the same problem while using string slicing.

@DonJayamanne
Copy link

Duplicate of #1461

@DonJayamanne DonJayamanne marked this as a duplicate of #1461 May 31, 2018
@charlesastaylor
Copy link
Author

Indeed it is, apologies. I think I included "slicing" in all my searches of current issues and nothing came up.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-formatting bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

4 participants