Skip to content

pylint

Why pylint rule W1203 is important

cover

If you have been using pylint 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. On the pylint documentation about this rule it is said that you shouldn't use f-string formated strings.