change logging format to %

This commit is contained in:
2024-06-28 20:08:08 +08:00
parent fe3f610878
commit 0c88302053
8 changed files with 43 additions and 30 deletions

View File

@ -126,7 +126,7 @@ class RatingClassSelector(QWidget):
elif ratingClass in range(len(self.buttons)):
button = self.buttons[ratingClass]
else:
logger.debug(f"Cannot select {ratingClass=}, condition check failed")
logger.debug("Cannot select ratingClass=%s, condition check failed", ratingClass)
return
if not button.isEnabled():

View File

@ -192,7 +192,7 @@ class SongIdSelector(Ui_SongIdSelector, QWidget):
self.fillSongIdComboBox()
return True
else:
logger.warning(f'Attempting to select an unknown pack "{packId}"')
logger.warning("Attempting to select an unknown pack [%s]", packId)
return False
def selectSongId(self, songId: str) -> bool:
@ -202,7 +202,8 @@ class SongIdSelector(Ui_SongIdSelector, QWidget):
return True
else:
logger.warning(
f'Attempting to select an unknown song "{songId}", maybe try selecting a pack first?'
"Attempting to select an unknown song [%s], maybe try selecting a pack first?",
songId,
)
return False