Skip to content

Replace f-strings in log. calls #185

@mpangrazzi

Description

@mpangrazzi

We are using f-strings in almost all log calls.

On codebase, there are log.trace or log.debug calls which are not evaluated due to log level, but f-string are eagerly evaluated so this means a small performance drop. Even in most of the cases this is negligible, it's would be good to fix it.

Example:

# Using f-strings
log.success(f"YAML pipeline '{pipeline_name}' successfully added to registry")
# Using braces format (better)
log.success("YAML pipeline '{}' successfully added to registry", pipeline_name)

References:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions