[AutoAccept][Codemod][FBSourceClangFormatLinter] Daily arc lint --take CLANGFORMAT

Reviewed By: zertosh

Differential Revision: D33524330

fbshipit-source-id: 112291a23e2efe2d573bee86ead8ce2fc3957e5b
This commit is contained in:
CodemodService FBSourceClangFormatLinterBot
2022-01-11 04:19:25 -08:00
committed by Facebook GitHub Bot
parent fdda7b5e8a
commit fb8a9732d9
3 changed files with 32 additions and 23 deletions

View File

@ -1104,7 +1104,8 @@ std::shared_ptr<SugaredValue> toSugaredValue(
}
}
auto opoverloadpacket_type = py::module::import("torch").attr("_ops").attr("OpOverloadPacket");
auto opoverloadpacket_type =
py::module::import("torch").attr("_ops").attr("OpOverloadPacket");
py::bool_ is_overloadpacket = py::isinstance(obj, opoverloadpacket_type);
if (is_overloadpacket) {
obj = py::getattr(obj, "op");