Skip to content

Fix: Remove unnecessary str() calls in logging statements #8

Description

@srics96

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    fix-meGhost Ship will auto-fix this issue

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions