mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Update docstrings (#7374)
* Update docstrings * Update docstrings * Update docstrings * Update docstrings * Update docstrings * Update docstrings * Update docstring * Update docstrings * Update docstrings * Fix lint issues * Update docstrings * Revert changes in dict
This commit is contained in:
committed by
Paulus Schoutsen
parent
0e08925259
commit
a4f1f6e724
@@ -131,7 +131,7 @@ class Template(object):
|
||||
try:
|
||||
return self._compiled.render(variables).strip()
|
||||
except jinja2.TemplateError as ex:
|
||||
_LOGGER.error('Error parsing value: %s (value: %s, template: %s)',
|
||||
_LOGGER.error("Error parsing value: %s (value: %s, template: %s)",
|
||||
ex, value, self.template)
|
||||
return value if error_value is _SENTINEL else error_value
|
||||
|
||||
@@ -238,11 +238,11 @@ class LocationMethods(object):
|
||||
point_state = self._resolve_state(args[0])
|
||||
|
||||
if point_state is None:
|
||||
_LOGGER.warning('Closest:Unable to find state %s', args[0])
|
||||
_LOGGER.warning("Closest:Unable to find state %s", args[0])
|
||||
return None
|
||||
elif not loc_helper.has_location(point_state):
|
||||
_LOGGER.warning(
|
||||
'Closest:State does not contain valid location: %s',
|
||||
"Closest:State does not contain valid location: %s",
|
||||
point_state)
|
||||
return None
|
||||
|
||||
@@ -257,7 +257,7 @@ class LocationMethods(object):
|
||||
|
||||
if latitude is None or longitude is None:
|
||||
_LOGGER.warning(
|
||||
'Closest:Received invalid coordinates: %s, %s',
|
||||
"Closest:Received invalid coordinates: %s, %s",
|
||||
args[0], args[1])
|
||||
return None
|
||||
|
||||
@@ -297,7 +297,7 @@ class LocationMethods(object):
|
||||
|
||||
if latitude is None or longitude is None:
|
||||
_LOGGER.warning(
|
||||
'Distance:State does not contains a location: %s',
|
||||
"Distance:State does not contains a location: %s",
|
||||
value)
|
||||
return None
|
||||
|
||||
@@ -305,7 +305,7 @@ class LocationMethods(object):
|
||||
# We expect this and next value to be lat&lng
|
||||
if not to_process:
|
||||
_LOGGER.warning(
|
||||
'Distance:Expected latitude and longitude, got %s',
|
||||
"Distance:Expected latitude and longitude, got %s",
|
||||
value)
|
||||
return None
|
||||
|
||||
@@ -314,8 +314,8 @@ class LocationMethods(object):
|
||||
longitude = convert(value_2, float)
|
||||
|
||||
if latitude is None or longitude is None:
|
||||
_LOGGER.warning('Distance:Unable to process latitude and '
|
||||
'longitude: %s, %s', value, value_2)
|
||||
_LOGGER.warning("Distance:Unable to process latitude and "
|
||||
"longitude: %s, %s", value, value_2)
|
||||
return None
|
||||
|
||||
locations.append((latitude, longitude))
|
||||
|
||||
Reference in New Issue
Block a user