Skip to content

Conflation of Pythonic format string implementations results in uninformative log output #939

@SeanPesce

Description

@SeanPesce

This print statement combines an "F-string" (f'') and str.format, resulting in the same uninformative log output for every call:

[scan]	INFO	Skipping "0" due to `1`.

The relevant code snippet is as follows:

                    debug_msg = f'Skipping "{0}" due to `{1}`.'.format(
                        kwargs['secret'],
                        filter_fn.path,
                    )

Of course, the fix is to simply use one or the other:

                    debug_msg = 'Skipping "{0}" due to `{1}`.'.format(
                        kwargs['secret'],
                        filter_fn.path,
                    )

or:

                    debug_msg = f'Skipping "{kwargs["secret"]}" due to `{filter_fn.path}`.'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions