convert-hf : flake8 doesn't like lowercase L as a variable name

This commit is contained in:
Francis Couture-Harpin 2024-05-04 10:48:18 -04:00
parent f09674fbbd
commit 0c3833286e

View file

@ -2251,12 +2251,12 @@ class LazyTorchTensor:
def _recurse_apply(o: Any, fn: Callable[[Any], Any]) -> Any:
# TODO: dicts
if isinstance(o, (list, tuple)):
l = []
L = []
for item in o:
l.append(LazyTorchTensor._recurse_apply(item, fn))
L.append(LazyTorchTensor._recurse_apply(item, fn))
if isinstance(o, tuple):
l = tuple(l)
return l
L = tuple(L)
return L
elif isinstance(o, LazyTorchTensor):
return fn(o)
else: