convert-hf : flake8 doesn't like lowercase L as a variable name
This commit is contained in:
parent
f09674fbbd
commit
0c3833286e
1 changed files with 4 additions and 4 deletions
|
@ -2251,12 +2251,12 @@ class LazyTorchTensor:
|
||||||
def _recurse_apply(o: Any, fn: Callable[[Any], Any]) -> Any:
|
def _recurse_apply(o: Any, fn: Callable[[Any], Any]) -> Any:
|
||||||
# TODO: dicts
|
# TODO: dicts
|
||||||
if isinstance(o, (list, tuple)):
|
if isinstance(o, (list, tuple)):
|
||||||
l = []
|
L = []
|
||||||
for item in o:
|
for item in o:
|
||||||
l.append(LazyTorchTensor._recurse_apply(item, fn))
|
L.append(LazyTorchTensor._recurse_apply(item, fn))
|
||||||
if isinstance(o, tuple):
|
if isinstance(o, tuple):
|
||||||
l = tuple(l)
|
L = tuple(L)
|
||||||
return l
|
return L
|
||||||
elif isinstance(o, LazyTorchTensor):
|
elif isinstance(o, LazyTorchTensor):
|
||||||
return fn(o)
|
return fn(o)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue