skbel icon indicating copy to clipboard operation
skbel copied to clipboard

refactor: removing list casting for dict.keys()

Open allrob23 opened this issue 8 months ago • 0 comments

This PR removes unnecessary list() calls around dictionary .keys() in several places within transport_map.py. Using list() in expressions like key in list(some_dict.keys()) is redundant, as dict_keys objects already support membership checks efficiently.

This change leads to slightly more efficient code by avoiding temporary list allocations, which, while not significant due to the small number of elements, contributes to cleaner and more idiomatic Python code.

allrob23 avatar Apr 17 '25 09:04 allrob23