Closed unhott closed 3 years ago
There were a few instances of something like dictionary[very_long_key1][very_long_key2] that could potentially be made more readable by adding a shorter, more readable variable. e.g.,
readable_name = dictionary[very_long_key1][very_long_key2]
string = f'{readable_name} is more readable than {dictionary[very_long_key1][very_long_key2]}'
but I wasn't really thinking too deeply to make such a change
yea f strings better, don't think using python 2.7? but hate to make changes to lots of files at once esp if conflicts and just simple formating changes. Will hold off on this for now
I was reviewing this and trying to make sense of it, so I translated instances of .format() to f strings.
If you are in python 3.6 (iirc) or greater, then f strings are typically more readable and easier to write.
If there's a reason that this needs to be compatible with python < 3.6, feel free to close this :)