cooperdk / YAPO-e-plus

YAPO e+ - Yet Another Porn Organizer (extended)
https://github.com/cooperdk/YAPO-e-plus
GNU General Public License v3.0
144 stars 15 forks source link

fixed much of string formatting #26

Closed RiedleroD closed 4 years ago

RiedleroD commented 4 years ago

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 of os.path.join(odir,".."))

Also also I replaced some iconcat forloops with .join() because that's faster, more readable, and way less code.

cooperdk commented 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 :-)

RiedleroD commented 4 years ago

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.