Skip to content

Conversation

duncf
Copy link
Contributor

@duncf duncf commented Jul 22, 2017

With this change CommaProxyList better handles and preserves non-standard (and
even inconsistent) indentation, rather than assuming indented lists are indented
by four spaces (fixes #100). It also is significantly faster in very large files
by avoiding use of ".indentation", which can require iterating over every
element in the file. End-of-list comments are preserved at the end of the list,
and inline comments are also preserved.

With this change CommaProxyList better handles and preserves non-standard (and
even inconsistent) indentation, rather than assuming indented lists are indented
by four spaces (fixes PyCQA#100). It also is significantly faster in very large files
by avoiding use of ".indentation", which can require iterating over every
element in the file. End-of-list comments are preserved at the end of the list,
and inline comments are also preserved.
@janlugt
Copy link

janlugt commented Jan 4, 2018

I have the same issue, could this please be merged?

@janlugt
Copy link

janlugt commented May 16, 2018

@Psycojoker, could you take a look at this?

@janlugt
Copy link

janlugt commented Dec 9, 2019

@Psycojoker, could you reconsider merging this and #145? It dramatically improves the performance of the CommaProxyList algorithm.

@hectorv
Copy link

hectorv commented Apr 30, 2020

+1
The CommaList exception got me here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

handle indented cases in CommaProxyList
3 participants