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

Trailing comma is not deleted in a one-line dict literal #3010

Closed
futujaos opened this issue Apr 12, 2022 · 2 comments
Closed

Trailing comma is not deleted in a one-line dict literal #3010

futujaos opened this issue Apr 12, 2022 · 2 comments
Labels
F: trailing comma Full of magic R: duplicate This issue or pull request already exists T: bug Something isn't working

Comments

@futujaos
Copy link

futujaos commented Apr 12, 2022

Playground, or code sample:

Before

user_info = {
    'worker': _make_worker_info,
    'requester': _make_user_info,
}[user_type](user)

After

user_info = {"worker": _make_worker_info, "requester": _make_user_info,}[
    user_type
](user)
@futujaos futujaos added the T: bug Something isn't working label Apr 12, 2022
@JelleZijlstra JelleZijlstra added the F: trailing comma Full of magic label Apr 12, 2022
@JelleZijlstra
Copy link
Collaborator

Duplicate of #2052

@JelleZijlstra JelleZijlstra marked this as a duplicate of #2052 Apr 12, 2022
@JelleZijlstra
Copy link
Collaborator

Though your issue title is a lot better, I'll rename the other one

@ichard26 ichard26 added the R: duplicate This issue or pull request already exists label Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: trailing comma Full of magic R: duplicate This issue or pull request already exists T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants