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

Add check against initializing and then mutating a dictionary #5765

Closed
wants to merge 2 commits into from

Conversation

nickdrozd
Copy link
Contributor

Type of Changes

Type
✨ New feature

Description

Add a new optional check against initializing a dictionary and then immediately mutating it.

Closes #2876

@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.14.0 milestone Feb 6, 2022
@Pierre-Sassoulas Pierre-Sassoulas added Proposal 📨 Needs review 🔍 Needs to be reviewed by one or multiple more persons and removed Proposal 📨 labels Feb 6, 2022
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm putting this in 2.14 as I'm hoping to release 2.13 at some point and it's becoming huge. We'll still have python 3.7 support in 2.14so the code should be compatible with it.

@DanielNoord
Copy link
Collaborator

Hi @nickdrozd,

We have been working on the documentation of the messages that pylint emits. As this PR adds a new message could I ask you to rebase on main and add two examples for bad and good code like explained in #5953? That way we immediately help users understand what this new message will do 😄

@jacobtylerwalls jacobtylerwalls added Waiting on author Indicate that maintainers are waiting for a message of the author Enhancement ✨ Improvement to a component labels Apr 17, 2022
@DanielNoord DanielNoord removed this from the 2.14.0 milestone May 4, 2022
@DanielNoord DanielNoord removed the Needs review 🔍 Needs to be reviewed by one or multiple more persons label Jun 21, 2022
@clavedeluna
Copy link
Contributor

@nickdrozd do you still have bandwidth to work on this?

@nickdrozd
Copy link
Contributor Author

@clavedeluna Yes, although if it interests you, please feel free to take it over!

@Pierre-Sassoulas Pierre-Sassoulas added Needs take over 🛎️ Orignal implementer went away but the code could be salvaged. and removed Waiting on author Indicate that maintainers are waiting for a message of the author labels Nov 17, 2022
@clavedeluna
Copy link
Contributor

Yes I can take over. I may just need to create a separate PR tho, to avoid permission issues. May be easy to fix but idk how exactly.

@nickdrozd nickdrozd deleted the dict-init branch October 7, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ✨ Improvement to a component Needs take over 🛎️ Orignal implementer went away but the code could be salvaged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New check: Use single-statement dict initialization
5 participants