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 redefined-builtin #2507

Merged
merged 1 commit into from
Jan 9, 2023
Merged

Conversation

avylove
Copy link
Contributor

@avylove avylove commented Jan 6, 2023

Enables redefined-builtin check. Python allows redefining built-in methods and classes. This gives a lot of flexibility to the language, but can have unexpected consequences and introduce bugs when done unintentionally. This check fails when a built-in function or class is redefined, protecting against doing this unintentionally.

In some cases the variables could be removed
In others, I attempted to rename the variable
When a new name wasn't clear, I used the standard convention of adding a _ to the end of the name.
VSCode rename symbol functionality was used to handle renaming and then manually reviewed.

@squirrelsc
Copy link
Member

@LiliDeng LGTM. Let's merge it next Monday.

@LiliDeng
Copy link
Collaborator

LiliDeng commented Jan 7, 2023

@LiliDeng LGTM. Let's merge it next Monday.

Ack.

@LiliDeng LiliDeng merged commit ee1ee59 into microsoft:main Jan 9, 2023
@avylove avylove deleted the pylint_4 branch August 8, 2023 15:36
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.

3 participants