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

Emit assignment-from-no-return instead of assignment-from-none for implicitly returning stdlib calls #8810

Closed
jacobtylerwalls opened this issue Jul 1, 2023 · 1 comment · Fixed by #8817 or #9093
Assignees
Labels
Maintenance Discussion or action around maintaining pylint or the dev workflow
Milestone

Comments

@jacobtylerwalls
Copy link
Member

"Assignment from no return" is essentially the same as "assignment from none". I don't see the point of maintaining a distinction.

Besides suggesting that there is a distinction, we might also cause confusion with typing.NoReturn which signifies not an implicit return but always raising.

Suggest that in 3.0 we start always emitting assignment-from-none and mark assignment-from-no-return as a historical name.

@jacobtylerwalls jacobtylerwalls added Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling Maintenance Discussion or action around maintaining pylint or the dev workflow and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Jul 1, 2023
@jacobtylerwalls jacobtylerwalls modified the milestones: 3.0.0b1, 3.0.0a7 Jul 1, 2023
@jacobtylerwalls
Copy link
Member Author

Discussed here: we won't merge the two checks, since storing a None from a function with explicit returns might be informative.

In that case, we need to emit the correct message (assignment-from-no-return) for stdlib calls like dict.update() and list.sort() -- see #8809 and #5738.

@jacobtylerwalls jacobtylerwalls changed the title Merge assignment-from-no-return with assignment-from-none Emit assignment-from-no-return instead of assignment-from-none for implicitly returning stdlib calls Jul 3, 2023
@jacobtylerwalls jacobtylerwalls self-assigned this Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Discussion or action around maintaining pylint or the dev workflow
Projects
None yet
1 participant