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
{{ message }}
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
If a hanging indent is closed after some values have been entered, it incorrectly keeps the indentation level.
Example:
x= [
0,1,2,3]
pressing enter before the ] character results in
x= [
0,1,2,3
]
instead of producing
x= [
0,1,2,3
]
as expected. If the hanging indent were created to begin with, then the bracket would be correctly placed, this only occurs if a previously non-hanging-indented set of lines were converted to a hanging indent.
Note, however, that it is not enough simply to look for a comma. Consider the case of the (admittedly rarely used) multi-line string created via parentheses:
x= (
'here is a multi-line string'' that spans several lines without any commas'' how will we detect this correctly? If this were'' inside brackets, then we would want to see if there'' is a comma, but since it is parentheses, there does'' not need to be a comma...''It appears as if there is no certain way to tell what the'' indentation should be here, probably best to default to'' current behavior, which is to set indentation to current indentation.'
)
x= [
'compare the above to this',
'where now we should close the hanging''indent because there is no comma'
]
Need to think more about what the desired behavior actually is here.
If a hanging indent is closed after some values have been entered, it incorrectly keeps the indentation level.
Example:
pressing enter before the
]character results ininstead of producing
as expected. If the hanging indent were created to begin with, then the bracket would be correctly placed, this only occurs if a previously non-hanging-indented set of lines were converted to a hanging indent.
Note, however, that it is not enough simply to look for a comma. Consider the case of the (admittedly rarely used) multi-line string created via parentheses:
Need to think more about what the desired behavior actually is here.