mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
[BE]: Enable ruff rule PIE800 - unnecessary nested dict expansion (#113880)
Adds an additional list which removes unnecessary dict literal unpacking, also applies the fixes. Pull Request resolved: https://github.com/pytorch/pytorch/pull/113880 Approved by: https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
bdf0b196db
commit
d9f2cf9974
@ -222,13 +222,11 @@ def map_to_dtype(e, dtype):
|
||||
def deserialize_args(inps):
|
||||
inps = inps.strip().strip("'")
|
||||
global_vals = {
|
||||
**{
|
||||
"T": deserialize_tensor,
|
||||
"ST": deserialize_sparse_tensor,
|
||||
"th": torch,
|
||||
"inf": math.inf,
|
||||
"torch": torch,
|
||||
},
|
||||
"T": deserialize_tensor,
|
||||
"ST": deserialize_sparse_tensor,
|
||||
"th": torch,
|
||||
"inf": math.inf,
|
||||
"torch": torch,
|
||||
**dtype_abbrs_parsing,
|
||||
}
|
||||
# f strings introduce quotations we dont want
|
||||
|
Reference in New Issue
Block a user