Skip to content

Commit

Permalink
autoflake: add missing type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
fsouza committed Jun 25, 2023
1 parent b5b07cd commit 03a61b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion autoflake.py
Expand Up @@ -205,7 +205,10 @@ def create_key_to_messages_dict(
messages: Iterable[pyflakes.messages.MultiValueRepeatedKeyLiteral],
) -> Mapping[Any, Iterable[pyflakes.messages.MultiValueRepeatedKeyLiteral]]:
"""Return dict mapping the key to list of messages."""
dictionary = collections.defaultdict(list)
dictionary: dict[
Any,
list[pyflakes.messages.MultiValueRepeatedKeyLiteral],
] = collections.defaultdict(list)
for message in messages:
dictionary[message.message_args[0]].append(message)
return dictionary
Expand Down

0 comments on commit 03a61b0

Please sign in to comment.