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 Implementation for Pylint E1132: Repeated Keyword #8706

Merged
merged 7 commits into from
Nov 19, 2023

Conversation

AlexBieg
Copy link
Contributor

Summary

Adds the Pylint rule E1132 to check for repeated keyword arguments in a function call.

Test Plan

Tested via the included unit tests and manual spot checking.

Copy link
Contributor

github-actions bot commented Nov 15, 2023

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@charliermarsh
Copy link
Member

Awesome, thanks for this PR and for getting involved!

There's some overlap here with #8450, I'm almost wondering if they should one rule since they both only deal with static dictionary spreads, but I think I need to take a closer look at the code before I have a clear answer to that.

@charliermarsh charliermarsh added the rule Implementing or modifying a lint rule label Nov 16, 2023
@AlexBieg
Copy link
Contributor Author

Oh yeah! I totally did not see that other PR. I'm happy to help merge stuff if we go down that route.

I also should have mentioned this in the summary, but this is my first meaningful Rust code besides random side projects, so feel free to be extra nit-picky with your comments 😄

@charliermarsh
Copy link
Member

Okay, it's probably fine to just proceed with this rule on its own. Left a few comments!

@AlexBieg
Copy link
Contributor Author

@charliermarsh Okay this is ready for another pass. All of your comments should be addressed. I also updated some of my destructuring statements to use .. so that unused values weren't just destructured into _ variables. I think it made it easier to read, but happy to change it back if it's not the preferred style.

Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

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

Thanks!

@charliermarsh charliermarsh added the preview Related to preview mode features label Nov 19, 2023
@charliermarsh charliermarsh enabled auto-merge (squash) November 19, 2023 00:22
@charliermarsh charliermarsh merged commit 9279114 into astral-sh:main Nov 19, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Related to preview mode features rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants