You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VS Code version: 1.19.3
Python Extension version: 2018.1.0
Python Version: 3.6.3
OS and version: Windows 10 1709
Actual behavior
When adding new line within brackets, the indentation does not conform to PEP8 format. E.g.
some_list = [item1,<press enter here>
<cursor gets to here>
Expected behavior
some_list = [item1,<press enter here>
<cursor expected to be here>
I'm not sure if this is a python extension related issue or maybe VS code issue. I'm also using Vim, which has an extension specifically for this: https://github.com/Vimjas/vim-python-pep8-indent. It would be nice if this feature can be added to the extension. Thanks.
This is indeed similar to #481. But there are also some python-specific conventions of indentation that are not usually found in other languages such as C/C++. So I think it is reasonable to consider incorporating this functionality into the python extension.
Ideally, the final result should be just like what https://github.com/Vimjas/vim-python-pep8-indent has done. And to be honest, this is one of the main reasons I sometimes still switch back to Vim, despite the great environment VS code and this extension has already provided.
Reacted by Jonathan Gall, Jake Brinkmann, Robert L. Logan IV and MinnML
Kris Jobs (@krisjobs) no as the June milestone is specifically bug fixes only as we're trying to free up time for the experimental debugger. Once that's work is done we will come back to enhancements and working on automatic indentation, I suspect, will be high on our list.
Don Jayamanne (@DonJayamanne) It is a duplicate as long as you pay attention to the note #481 (comment) that #481 should be more general than just function arguments, it applies to any sort of bracket pair. The issues as written in the OPs are not duplicates IMO.
Activity
DonJayamanne commentedon Feb 3, 2018
Similar to #481
Though that is specific to indenting of function arguments
Mikhail Arkhipov (@MikhailArkhipov) cc
seekiu commentedon Feb 5, 2018
This is indeed similar to #481. But there are also some python-specific conventions of indentation that are not usually found in other languages such as C/C++. So I think it is reasonable to consider incorporating this functionality into the python extension.
Ideally, the final result should be just like what https://github.com/Vimjas/vim-python-pep8-indent has done. And to be honest, this is one of the main reasons I sometimes still switch back to Vim, despite the great environment VS code and this extension has already provided.
krisjobs commentedon Jun 7, 2018
So, was this moved to the June18 milestone?
brettcannon commentedon Jun 7, 2018
Kris Jobs (@krisjobs) no as the June milestone is specifically bug fixes only as we're trying to free up time for the experimental debugger. Once that's work is done we will come back to enhancements and working on automatic indentation, I suspect, will be high on our list.
kbrose commentedon Jan 5, 2019
Hello, I'm wondering if it would be possible to get a status update on this issue? I see a little bit of action in the related #481.
DonJayamanne commentedon Jan 5, 2019
Duplicate of #481
kbrose commentedon Jan 8, 2019
Don Jayamanne (@DonJayamanne) It is a duplicate as long as you pay attention to the note #481 (comment) that #481 should be more general than just function arguments, it applies to any sort of bracket pair. The issues as written in the OPs are not duplicates IMO.