Skip to content

refactor: removing list casting for dict.keys()#7

Open
allrob23 wants to merge 1 commit intorobinthibaut:mainfrom
allrob23:main
Open

refactor: removing list casting for dict.keys()#7
allrob23 wants to merge 1 commit intorobinthibaut:mainfrom
allrob23:main

Conversation

@allrob23
Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant