mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-10 02:46:29 +00:00
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
This commit is contained in:
parent
7ae6d9db7a
commit
3fde2e4f40
@ -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)
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user