Skip to content

Improve and simplify the CommaProxyList algorithm.#146

Open
duncf wants to merge 1 commit into
PyCQA:masterfrom
duncf:improve-comma-proxy-list
Open

Improve and simplify the CommaProxyList algorithm.#146
duncf wants to merge 1 commit into
PyCQA:masterfrom
duncf:improve-comma-proxy-list

Conversation

@duncf

@duncf duncf commented Jul 22, 2017

Copy link
Copy Markdown
Contributor

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

janlugt commented Jan 4, 2018

Copy link
Copy Markdown

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

@janlugt

janlugt commented May 16, 2018

Copy link
Copy Markdown

@Psycojoker, could you take a look at this?

@janlugt

janlugt commented Dec 9, 2019

Copy link
Copy Markdown

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

@hectorv

hectorv commented Apr 30, 2020

Copy link
Copy Markdown

+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