Add pylint CodeStyle extension (#53147)
This commit is contained in:
parent
c35b5a1c64
commit
f6b162bc39
60 changed files with 103 additions and 98 deletions
|
@ -191,7 +191,7 @@ class NetatmoOptionsFlowHandler(config_entries.OptionsFlow):
|
|||
def fix_coordinates(user_input):
|
||||
"""Fix coordinates if they don't comply with the Netatmo API."""
|
||||
# Ensure coordinates have acceptable length for the Netatmo API
|
||||
for coordinate in [CONF_LAT_NE, CONF_LAT_SW, CONF_LON_NE, CONF_LON_SW]:
|
||||
for coordinate in (CONF_LAT_NE, CONF_LAT_SW, CONF_LON_NE, CONF_LON_SW):
|
||||
if len(str(user_input[coordinate]).split(".")[1]) < 7:
|
||||
user_input[coordinate] = user_input[coordinate] + 0.0000001
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue