Fix use-dict-literal lint (#83718)

Fix use-dict-literal pylint suggestions by changing `dict()` to `{}`. This PR should do the change for every Python file except test/jit/test_list_dict.py, where I think the intent is to test the constructor.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83718
Approved by: https://github.com/albanD
This commit is contained in:
Sergii Dymchenko
2022-08-24 00:26:46 +00:00
committed by PyTorch MergeBot
parent fc470cf980
commit 591222f5d9
52 changed files with 84 additions and 84 deletions

View File

@ -239,7 +239,7 @@ def _all_gather(obj, worker_names=None, timeout=UNSET_RPC_TIMEOUT):
# Leader's signal is the first to be unblocked, after receiving all
# followers' data objects.
if is_leader:
worker_name_to_response_future_dict = dict()
worker_name_to_response_future_dict = {}
for follower_name in worker_names - {leader_name}:
fut = rpc_async(
follower_name,