From 03a61b0ddf13e44cdeda9d0b1d0ea016e71b19c4 Mon Sep 17 00:00:00 2001 From: francisco souza <108725+fsouza@users.noreply.github.com> Date: Sat, 24 Jun 2023 22:57:44 -0400 Subject: [PATCH] autoflake: add missing type annotation --- autoflake.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autoflake.py b/autoflake.py index 2d1066a..f184dd0 100755 --- a/autoflake.py +++ b/autoflake.py @@ -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