contrib/target: small refactors/cleanups
aesteve-rh opened this issue · 0 comments
aesteve-rh commented
Possible enhancements to the contrib/target
script:
%
formatting is used for string concatenation with variables. It should be using more modern f-strings or.format
method instead.- Path manipulation is done with raw string concatenation, having to manually add the path separators
/
. As in this case we do not need to support different OS it can be fine, but it is still not the most robust way to handle paths, as it can break in a future update if the separators are not properly used. Usingos.path.join
would handle it automatically. - [Optional] Use logging instead of prints would allow adding debug messages (or any other log level), and have a consistent format across the script.