Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pylint: Enable modified-iterating-list #2516

Closed
wants to merge 1 commit into from

Conversation

avylove
Copy link
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
Contributor Author

avylove commented Jan 18, 2023

@squirrelsc , @LiliDeng Any issues with this?

@squirrelsc
Copy link
Member

@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
Contributor Author

avylove commented Apr 26, 2023

Rebased. This is now 3.5 months old.

@squirrelsc
Copy link
Member

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