Issue
Several logging calls in schedule/__init__.py use str() conversion unnecessarily:
logger.debug("Running job %s", str(self))
This should be:
logger.debug("Running job %s", self)
The %s format specifier in Python's logging module already calls str() on the argument. Calling str() explicitly means the conversion happens even when the log level is disabled (e.g., when DEBUG logging is off), wasting CPU cycles.
Fix
Remove explicit str() calls from all logging statements in schedule/__init__.py where %s formatting is already used.
References
Issue
Several logging calls in
schedule/__init__.pyusestr()conversion unnecessarily:This should be:
The
%sformat specifier in Python's logging module already callsstr()on the argument. Callingstr()explicitly means the conversion happens even when the log level is disabled (e.g., when DEBUG logging is off), wasting CPU cycles.Fix
Remove explicit
str()calls from all logging statements inschedule/__init__.pywhere%sformatting is already used.References