Skip to content

Pylint: Enable redefined-builtin#2507

Merged
LiliDeng merged 1 commit into
microsoft:mainfrom
avylove:pylint_4
Jan 9, 2023
Merged

Pylint: Enable redefined-builtin#2507
LiliDeng merged 1 commit into
microsoft:mainfrom
avylove:pylint_4

Conversation

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

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

@LiliDeng
Copy link
Copy Markdown
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