Closed RiedleroD closed 4 years ago
I totally agree that inline string formatting is best. Some places I forget about then and just write a long print ("xxx" + xxx + " yyy " + yyy) statement... thanks for the corrections :-)
I would've checked if everything still worked before merging, but ok. I didn't check if I made any errors because I was just too exhausted from going through thousands of lines of code. I'm pretty sure I broke at least a few things.
I used inline format strings where necessary, because:
inline →
f"{v1} {v2}"
new →"{} {}".format(v1,v2)
old →"%s %s"%(v1,v2)
concat →v1 + " " + v2
(assuming v1 and v2 are strings)Also I fixed some weird path formatting & fixed possible infinite path strings (use
os.path.dirname(odir)
instead ofos.path.join(odir,"..")
)Also also I replaced some iconcat forloops with .join() because that's faster, more readable, and way less code.