Refactoriser pour supprimer os.path
Linkmauve conseille de remplacer l’usage d’os.path
par pathlib.Path
et pathlib.PathBuf
qui rend le code plus lisible :
checkfile = "{}{}/{}.blend.check".format(repo_folder, checkfiles_dir, (os.path.splitext(final_path))[0])
devient alors
checkfile = repo_folder / checkfiles_dir / (final_path.stem + '.blend.check')
voire utiliser aussi :
final_path.with_suffix('.blend.check') est encore plus explicite que la concaténation.