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

B033 should say what the duplicate set item is #384

Closed
JelleZijlstra opened this issue May 22, 2023 · 0 comments · Fixed by #385
Closed

B033 should say what the duplicate set item is #384

JelleZijlstra opened this issue May 22, 2023 · 0 comments · Fixed by #385
Assignees

Comments

@JelleZijlstra
Copy link
Collaborator

I got an error taxonomy/parsing.py:87:11: B033 Sets should not contain duplicate items. Duplicate items will be replaced with a single item at runtime.

Now, part of this set looks like this:

            "İ",
            "À",
            "Á",
            "Ć",
            "Á",
            "Å",
            "Ä",

I think it's the Á, but it would have been more helpful if flake8-bugbear had told me directly.

I'll work on a fix.

@JelleZijlstra JelleZijlstra self-assigned this May 22, 2023
JelleZijlstra added a commit to JelleZijlstra/flake8-bugbear that referenced this issue May 22, 2023
- Include the repr() of the duplicate item in the error
- Point the error directly at the duplicate item

Fixes PyCQA#384
JelleZijlstra added a commit that referenced this issue May 22, 2023
- Include the repr() of the duplicate item in the error
- Point the error directly at the duplicate item

Fixes #384
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant