Skip to content

Commit eeff1cf

Browse files
committed
style(utils): format long condition to satisfy black hook
1 parent fb2e6fe commit eeff1cf

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

graph_net/torch/utils.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,17 @@ def convert_meta_classes_to_tensors(file_path):
221221
data_type = getattr(torch, attrs.get("dtype", "torch.float").split(".")[-1])
222222
shape = attrs.get("shape", [])
223223

224-
if "min_val" in attrs and "max_val" in attrs and data_type in [
225-
torch.int8,
226-
torch.int16,
227-
torch.int32,
228-
torch.int64,
229-
]:
224+
if (
225+
"min_val" in attrs
226+
and "max_val" in attrs
227+
and data_type
228+
in [
229+
torch.int8,
230+
torch.int16,
231+
torch.int32,
232+
torch.int64,
233+
]
234+
):
230235
min_val = attrs["min_val"]
231236
max_val = attrs["max_val"]
232237
# torch.randint's upper bound is exclusive, so add 1

0 commit comments

Comments
 (0)