Skip to content

Commit 24ca2e6

Browse files
r-barnesAbhinav Arora
authored andcommitted
Del (object) from 10 inc pytorch/tensorboardX/tensorboardX/record_writer.py
Summary: Python3 makes the use of `(object)` in class inheritance unnecessary. Let's modernize our code by eliminating this. Reviewed By: meyering Differential Revision: D48958009 fbshipit-source-id: aa42e55a827d83aadf1b10b2de79317c3761ab7a
1 parent 2ed9954 commit 24ca2e6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

torchtext/data/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def _get_ngrams(n):
228228
yield " ".join(x)
229229

230230

231-
class RandomShuffler(object):
231+
class RandomShuffler:
232232
"""Use random functions while keeping track of the random state to make it
233233
reproducible and deterministic."""
234234

torchtext/vocab/vectors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def _infer_shape(f):
3131
return num_lines, vector_dim
3232

3333

34-
class Vectors(object):
34+
class Vectors:
3535
def __init__(self, name, cache=None, url=None, unk_init=None, max_vectors=None) -> None:
3636
"""
3737
Args:

0 commit comments

Comments
 (0)