Skip to main content

One post tagged with "performance"

View All Tags

Why pylint rule `W1203` is important

· 4 min read
Guillaume MARTINEZ
LeadTech DevOps & Cloud & IA

cover

If you have been using [pylint][pylint-website] tool to check the format of your Python code you may have encounterd the rule W1203: logging-fstring-interpolation but you didn't really understand why it's important.

The warning looks like :

path/to/my/file.py:37:4: W1203: Use lazy % formatting in logging functions (logging-fstring-interpolation)

It appears when you are using the [Python logging library][python-logging-doc]. On the [pylint][pylint-website] documentation about this rule it is said that you shouldn't use f-string formated strings.