Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 928f3a9

Browse files
committed
minor edit
1 parent 97ee0c1 commit 928f3a9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

torchtext/data/datasets_utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,22 +239,22 @@ def new_fn(fn):
239239

240240

241241
def _create_dataset_directory(dataset_name):
242-
def decorator(func):
243-
argspec = inspect.getfullargspec(func)
242+
def decorator(fn):
243+
argspec = inspect.getfullargspec(fn)
244244
if not (argspec.args[0] == "root" and
245245
argspec.args[1] == "split" and
246246
argspec.varargs is None and
247247
argspec.varkw is None and
248248
len(argspec.kwonlyargs) == 0
249249
):
250-
raise ValueError("Internal Error: Given function {} did not adhere to standard signature.".format(func))
250+
raise ValueError("Internal Error: Given function {} did not adhere to standard signature.".format(fn))
251251

252-
@functools.wraps(func)
252+
@functools.wraps(fn)
253253
def wrapper(root=_CACHE_DIR, *args, **kwargs):
254254
new_root = os.path.join(root, dataset_name)
255255
if not os.path.exists(new_root):
256256
os.makedirs(new_root)
257-
return func(root=new_root, *args, **kwargs)
257+
return fn(root=new_root, *args, **kwargs)
258258

259259
return wrapper
260260

0 commit comments

Comments
 (0)