[Codemod][FBSourceBlackLinter] Daily arc lint --take BLACK

Reviewed By: zertosh

Differential Revision: D31423202

fbshipit-source-id: 08d249e8546c0bfe6f1145c0571141b90aad03eb
This commit is contained in:
CodemodService Bot
2021-10-05 20:54:37 -07:00
committed by Facebook GitHub Bot
parent d1058df885
commit cbc29acca3
3 changed files with 6 additions and 6 deletions

View File

@ -1,8 +1,9 @@
import os.path
from glob import glob
from typing import cast
from torch.types import Storage
import torch
from torch.types import Storage
# because get_storage_from_record returns a tensor!?
class _HasStorage(object):

View File

@ -18,12 +18,12 @@ from typing import (
Sequence,
Set,
Union,
cast
cast,
)
from torch.types import Storage
import torch
from torch.serialization import location_tag, normalize_storage_type
from torch.types import Storage
from torch.utils.hooks import RemovableHandle
from ._digraph import DiGraph
@ -800,7 +800,6 @@ class PackageExporter:
dtype = obj.dtype
storage_numel = obj.size()
else:
storage = obj
storage_type = normalize_storage_type(type(storage))

View File

@ -219,8 +219,8 @@ class PackageImporter(Importer):
# TODO: Once we decide to break serialization FC, we can
# stop wrapping with TypedStorage
return torch.storage.TypedStorage(
wrap_storage=storage._untyped(),
dtype=dtype)
wrap_storage=storage._untyped(), dtype=dtype
)
elif typename == "reduce_package":
# to fix BC breaking change, objects on this load path
# will be loaded multiple times erroneously