Skip to content

Pylint: Enable modified-iterating-list#2516

Closed
avylove wants to merge 1 commit into
microsoft:mainfrom
avylove:pylint_6
Closed

Pylint: Enable modified-iterating-list#2516
avylove wants to merge 1 commit into
microsoft:mainfrom
avylove:pylint_6

Conversation

@avylove
Copy link
Copy Markdown
Contributor

@avylove avylove commented Jan 10, 2023

Modifying an iterator while iterating over it can have unexpected behavior.
Enables modified-iterating-list check and fixes code.

@avylove
Copy link
Copy Markdown
Contributor Author

avylove commented Jan 18, 2023

@squirrelsc , @LiliDeng Any issues with this?

@squirrelsc
Copy link
Copy Markdown
Contributor

@squirrelsc , @LiliDeng Any issues with this?

It touches the core part, we don't have a chance to verify it.

@avylove avylove force-pushed the pylint_6 branch 3 times, most recently from 1f9a9a2 to 1c2be17 Compare February 6, 2023 15:14
@avylove avylove force-pushed the pylint_6 branch 2 times, most recently from d77c2ce to 94d3a98 Compare February 27, 2023 22:05
@avylove avylove force-pushed the pylint_6 branch 2 times, most recently from c9c1ff1 to d4fc9f3 Compare March 20, 2023 14:10
@avylove
Copy link
Copy Markdown
Contributor Author

avylove commented Apr 26, 2023

Rebased. This is now 3.5 months old.

@squirrelsc
Copy link
Copy Markdown
Contributor

Please either test with impacted scenarios or suppress this code to enable the rule. This place is safe, because the iterator is broken out after modified.

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.

2 participants