Skip to content

Commit 616208b

Browse files
Skylion007pytorchmergebot
authored andcommitted
[BE]: Cleanup deprecated stdlib imports (UP006,UP035) (pytorch#101361)
Automated fix to cleanup some deprecated/useless python imports. Pull Request resolved: pytorch#101361 Approved by: https://github.com/zou3519
1 parent 1b7d875 commit 616208b

File tree

5 files changed

+1
-7
lines changed

5 files changed

+1
-7
lines changed

caffe2/contrib/tensorboard/tensorboard_exporter.py

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44

55

6-
from builtins import bytes
76
import copy
87
import logging
98
import os

caffe2/python/predictor/predictor_exporter.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from caffe2.python.predictor_constants import predictor_constants
1212
import caffe2.python.predictor.serde as serde
1313
import caffe2.python.predictor.predictor_py_utils as utils
14-
from builtins import bytes
1514
import collections
1615

1716

test/quantization/core/test_quantized_op.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Owner(s): ["oncall: quantization"]
22

3-
from builtins import round
43

54
import copy
65
import itertools

torch/onnx/_internal/diagnostics/infra/context.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99

1010
import logging
1111

12-
from typing import Callable, Generator, List, Mapping, Optional, Type, TypeVar
13-
14-
from typing_extensions import Literal
12+
from typing import Callable, Generator, List, Literal, Mapping, Optional, Type, TypeVar
1513

1614
from torch.onnx._internal.diagnostics import infra
1715
from torch.onnx._internal.diagnostics.infra import formatter, sarif, utils

torch/utils/tensorboard/_caffe2_graph.py

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from tensorboard.compat.proto.node_def_pb2 import NodeDef
88
from tensorboard.compat.proto.tensor_shape_pb2 import TensorShapeProto
99

10-
from builtins import bytes
1110
from caffe2.proto import caffe2_pb2
1211
from caffe2.python import core, workspace
1312

0 commit comments

Comments
 (0)