Use f-strings in integrations starting with "M" (#32271)
* Use f-strings in integrations starting with "M" * Format mqtt light init with black * Fix lint error * Fix pylint error * Restore constants * Update homeassistant/components/mqtt/discovery.py * Update homeassistant/components/mqtt/discovery.py * Update homeassistant/components/mqtt/discovery.py * Update homeassistant/components/mqtt/discovery.py * Format with Black
This commit is contained in:
1 parent
bbe0f75336
commit
ba0aaeeddb
34 files changed
+62
-80
No files matched your search
@@ -162,7 +162,7 @@ class ModbusThermostat(ClimateDevice):
|
||||
DATA_TYPE_FLOAT: {1: "e", 2: "f", 4: "d"},
|
||||
}
|
||||
|
||||
self._structure = ">{}".format(data_types[self._data_type][self._count])
|
||||
self._structure = f">{data_types[self._data_type][self._count]}"
|
||||
|
||||
@property
|
||||
def supported_features(self):
|
||||
|
||||
@@ -99,8 +99,8 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
structure = ">i"
|
||||
if register[CONF_DATA_TYPE] != DATA_TYPE_CUSTOM:
|
||||
try:
|
||||
structure = ">{}".format(
|
||||
data_types[register[CONF_DATA_TYPE]][register[CONF_COUNT]]
|
||||
structure = (
|
||||
f">{data_types[register[CONF_DATA_TYPE]][register[CONF_COUNT]]}"
|
||||
)
|
||||
except KeyError:
|
||||
_LOGGER.error(
|
||||
|
||||
Reference in new issue
Block a user