mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-13 12:26:29 +00:00
Encourage new style string formatting (#87)
This commit is contained in:
parent
a1e1b94d46
commit
6549927701
@ -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')
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user