From 3fde2e4f40452359856208cc25ebb61a1484dcd7 Mon Sep 17 00:00:00 2001 From: Max Rydahl Andersen Date: Thu, 8 Nov 2018 18:27:20 +0100 Subject: [PATCH] fix misleading style guide (#140) * fix misleading style guide style guide stated to use new format style on strings, but when using logging `pylint` is configured to enforce `%s` usage for lazy log evaluation. * Make it shorter * Minor change --- docs/development_guidelines.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/development_guidelines.md b/docs/development_guidelines.md index c5b06948..1f9ba7e2 100644 --- a/docs/development_guidelines.md +++ b/docs/development_guidelines.md @@ -90,3 +90,9 @@ Prefer [new style string formatting](https://www.python.org/dev/peps/pep-3101/) "{} {}".format('New', 'style') "%s %s" % ('Old', 'style') ``` + +Except when doing logging here the format is: + +```python +_LOGGER.info("Can't connect to the webservice %s at %s", string1, string2) +```