Encourage new style string formatting (#87)

This commit is contained in:
Ville Skyttä 2018-09-15 10:07:13 +03:00 committed by GitHub
parent a1e1b94d46
commit 6549927701
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,3 +81,12 @@ Instead of order the imports manually, use [`isort`](https://github.com/timothyc
$ pip3 install isort
$ isort homeassistant/components/sensor/fixer.py
```
### Use new style string formatting
Prefer [new style string formatting](https://www.python.org/dev/peps/pep-3101/) over old.
```python
"{} {}".format('New', 'style')
"%s %s" % ('Old', 'style')
```