Skip to content
Commit 6ede0d5b authored by Joel Holdsworth's avatar Joel Holdsworth Committed by Benjamin Cabé
Browse files

code_relocation: fix ruff SUM401 warning



The ruff python linter produces a SIM401 warning when a dictionary is
accessed using if-statements to check for key presence. In this case, the
dict.get() method could be used instead.

For example:

    value = foo["bar"] if "bar" in foo else 0

...can be replaced with:

    value = foo.get("bar", 0)

This patch corrects the single instance of this issue in the script.

Signed-off-by: default avatarJoel Holdsworth <jholdsworth@nvidia.com>
parent f4c54fcb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment