Add pylint CodeStyle extension (#53147)

This commit is contained in:
Marc Mueller 2021-07-19 15:57:06 +02:00 committed by GitHub
parent c35b5a1c64
commit f6b162bc39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
60 changed files with 103 additions and 98 deletions

View file

@ -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