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

@ -1327,7 +1327,7 @@ def dispatch_lambda_exprs(
arg_parser_outputs = arg_parser_output_exprs(ps, f)
lambda_args = dispatch_lambda_args(ps, f)
inits: List[str] = []
lambda_args_exprs: Dict[str, str] = dict()
lambda_args_exprs: Dict[str, str] = {}
has_toptions = has_tensor_options(f)