Skip to content

Enable flake8-logging-format rule in Ruff #290

@jnptk

Description

@jnptk

Hi,

Today I learned about the flake8-logging-format (see: https://docs.astral.sh/ruff/rules/logging-f-string/) rule, which helps prevent using f-strings in logging calls.

It encourages using format arguments like:

logger.info("User %s logged in", user)

instead of f-strings, avoiding unnecessary string interpolation, improving logging consistency and following Python’s logging best practices.

Would it make sense to enable this rule in Plone’s Ruff setup?
If so, I’d be happy to open a PR to add it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions