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

Suppress redefined-builtin for specific builtins #3263

Closed
jonathanunderwood opened this issue Nov 19, 2019 · 4 comments · Fixed by #3643
Closed

Suppress redefined-builtin for specific builtins #3263

jonathanunderwood opened this issue Nov 19, 2019 · 4 comments · Fixed by #3643
Labels
Enhancement ✨ Improvement to a component Good first issue Friendly and approachable by new contributors Help wanted 🙏 Outside help would be appreciated, good for new contributors

Comments

@jonathanunderwood
Copy link

Is your feature request related to a problem? Please describe

I'd like in general to keep redefined-builtin warnings (i.e. W0622). But often on projects usiing a database/ORM I want to make use of id as a variable, and so would like to suppress that warning only for that one specific builtin.

Describe the solution you'd like

It would be good to have a configuration parameter that could be set to a list of builtins to suppress that warning for.

@PCManticore
Copy link
Contributor

Thanks for the report @jonathanunderwood I agree, this makes sense.

@PCManticore PCManticore added Good first issue Friendly and approachable by new contributors Enhancement ✨ Improvement to a component labels Nov 20, 2019
@gabrieldrs
Copy link
Contributor

hey, I would like to tackle this.

Just to be sure that I'm in the right page, this change must go in the variables checker, and a new option should be added to the options tuple right?

@kapsh
Copy link
Contributor

kapsh commented May 17, 2020

@gabrieldrs hello, are you working on this? I'd also like to see this feature and could take a shot on it if there are no work in progress.

@gabrieldrs
Copy link
Contributor

Hey @kapsh I haven't been able to look at this, please, feel free to take it :)

kapsh added a commit to kapsh/pylint that referenced this issue May 23, 2020
Some builtins have little-to-no use in application code while being
convenient as variables names (e.g. id, dir). New option allows
to configure allowed to override names for redefined-builtin checker.

Closes pylint-dev#3263
kapsh added a commit to kapsh/pylint that referenced this issue May 23, 2020
Some builtins have little-to-no use in application code while being
convenient as variables names (e.g. id, dir). New option allows
to configure allowed to override names for redefined-builtin checker.

Closes pylint-dev#3263
kapsh added a commit to kapsh/pylint that referenced this issue May 23, 2020
Some builtins have little-to-no use in application code while being
convenient as variables names (e.g. id, dir). New option allows
to configure allowed to override names for redefined-builtin checker.

Closes pylint-dev#3263
kapsh added a commit to kapsh/pylint that referenced this issue May 27, 2020
Some builtins have little-to-no use in application code while being
convenient as variables names (e.g. id, dir). New option allows
to configure allowed to override names for redefined-builtin checker.

Closes pylint-dev#3263
kapsh added a commit to kapsh/pylint that referenced this issue Feb 25, 2021
Some builtins have little-to-no use in application code while being
convenient as variables names (e.g. id, dir). New option allows
to configure allowed to override names for redefined-builtin checker.

Closes pylint-dev#3263
kapsh added a commit to kapsh/pylint that referenced this issue Feb 25, 2021
Some builtins have little-to-no use in application code while being
convenient as variables names (e.g. id, dir). New option allows
to configure allowed to override names for redefined-builtin checker.

Closes pylint-dev#3263
@Pierre-Sassoulas Pierre-Sassoulas added the Help wanted 🙏 Outside help would be appreciated, good for new contributors label Mar 2, 2021
kapsh added a commit to kapsh/pylint that referenced this issue Mar 5, 2021
Some builtins have little-to-no use in application code while being
convenient as variables names (e.g. id, dir). New option allows
to configure allowed to override names for redefined-builtin checker.

Closes pylint-dev#3263
kapsh added a commit to kapsh/pylint that referenced this issue Mar 5, 2021
Some builtins have little-to-no use in application code while being
convenient as variables names (e.g. id, dir). New option allows
to configure allowed to override names for redefined-builtin checker.

Closes pylint-dev#3263
Pierre-Sassoulas pushed a commit that referenced this issue Mar 5, 2021
Some builtins have little-to-no use in application code while being
convenient as variables names (e.g. id, dir). New option allows
to configure allowed to override names for redefined-builtin checker.

Closes #3263
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ✨ Improvement to a component Good first issue Friendly and approachable by new contributors Help wanted 🙏 Outside help would be appreciated, good for new contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants