Page MenuHome

Use dict in nice_hotkey_name in node_wrangler.py
ClosedPublic

Authored by jim man (jimman2003) on Jul 16 2021, 1:30 PM.

Details

Diff Detail

Event Timeline

jim man (jimman2003) requested review of this revision.Jul 16 2021, 1:30 PM
jim man (jimman2003) created this revision.
Sybren A. Stüvel (sybren) added inline comments.
node_wrangler.py
666

The downside here is that punc.replace("_", " ") is always evaluated, even when nice_name contains punc. I'd suggest using something like this:

try:
    return nice_name[punc]
except KeyError:
    return punc.replace("_", " ").title()
jim man (jimman2003) marked an inline comment as done.
jim man (jimman2003) added inline comments.
node_wrangler.py
666

Done!

This revision is now accepted and ready to land.Jul 16 2021, 2:22 PM