mirror of
https://github.com/home-assistant/core.git
synced 2025-11-08 10:29:27 +00:00
Use f-strings in integrations starting with "A" (#32110)
* Use f-strings in integrations starting with A * Use f-strings in tests for integrations starting with A * Fix pylint by renaming variable * Fix nested for loop in f-string for aprs device_tracker * Break long lines into multiple short lines * Break long lines into multiple short lines v2
This commit is contained in:
@@ -140,7 +140,7 @@ class ArestSensor(Entity):
|
||||
"""Initialize the sensor."""
|
||||
self.arest = arest
|
||||
self._resource = resource
|
||||
self._name = "{} {}".format(location.title(), name.title())
|
||||
self._name = f"{location.title()} {name.title()}"
|
||||
self._variable = variable
|
||||
self._pin = pin
|
||||
self._state = None
|
||||
@@ -204,8 +204,7 @@ class ArestData:
|
||||
try:
|
||||
if str(self._pin[0]) == "A":
|
||||
response = requests.get(
|
||||
"{}/analog/{}".format(self._resource, self._pin[1:]),
|
||||
timeout=10,
|
||||
f"{self._resource,}/analog/{self._pin[1:]}", timeout=10
|
||||
)
|
||||
self.data = {"value": response.json()["return_value"]}
|
||||
except TypeError:
|
||||
|
||||
Reference in New Issue
Block a user