Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
yangdanny97 committed Oct 30, 2024
1 parent 40bb666 commit 1c5a73a
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions bugbear.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import re
import sys
import warnings
from collections import defaultdict, namedtuple, Counter
from collections import Counter, defaultdict, namedtuple
from contextlib import suppress
from functools import lru_cache, partial
from keyword import iskeyword
Expand Down Expand Up @@ -662,10 +662,7 @@ def convert_to_value(item):

keys = [convert_to_value(key) for key in node.keys]
key_counts = Counter(keys)
duplicate_keys = [
key for key, count in key_counts.items()
if count > 1
]
duplicate_keys = [key for key, count in key_counts.items() if count > 1]
for key in duplicate_keys:
key_indices = [i for i, i_key in enumerate(keys) if i_key == key]
seen = set()
Expand Down Expand Up @@ -2370,11 +2367,7 @@ def visit_Lambda(self, node) -> None:
message="B040 Exception with added note not used. Did you forget to raise it?"
)

B041 = Error(
message=(
"B041 Repeated key-value pair in dictionary literal."
)
)
B041 = Error(message=("B041 Repeated key-value pair in dictionary literal."))

# Warnings disabled by default.
B901 = Error(
Expand Down

0 comments on commit 1c5a73a

Please sign in to comment.