Skip to content

Commit 987e621

Browse files
committed
cosmetic
1 parent 5a92a5f commit 987e621

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

memory_profiler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,18 +1012,18 @@ def choose_backend(new_backend=None):
10121012
"""
10131013

10141014
_backend = 'no_backend'
1015-
backends = [
1015+
all_backends = [
10161016
('psutil', has_psutil),
10171017
('posix', os.name == 'posix'),
10181018
('tracemalloc', has_tracemalloc),
10191019
('no_backend', True)
10201020
]
1021-
backends_indices = {b[0]: i for i, b in enumerate(backends)}
1021+
backends_indices = {b[0]: i for i, b in enumerate(all_backends)}
10221022

10231023
if new_backend is not None:
1024-
backends.insert(0, backends.pop(backends_indices[new_backend]))
1024+
all_backends.insert(0, all_backends.pop(backends_indices[new_backend]))
10251025

1026-
for n_backend, is_available in backends:
1026+
for n_backend, is_available in all_backends:
10271027
if is_available:
10281028
_backend = n_backend
10291029
break

0 commit comments

Comments
 (0)