mirror of
https://github.com/esphome/esphome.git
synced 2025-09-06 05:12:21 +01:00
Fix some lint errors in pylint 2.10.2 (#2226)
This commit is contained in:
@@ -836,10 +836,11 @@ pressure = float_with_unit("pressure", "(bar|Bar)", optional_unit=True)
|
||||
|
||||
|
||||
def temperature(value):
|
||||
err = None
|
||||
try:
|
||||
return _temperature_c(value)
|
||||
except Invalid as orig_err: # noqa
|
||||
pass
|
||||
except Invalid as orig_err:
|
||||
err = orig_err
|
||||
|
||||
try:
|
||||
kelvin = _temperature_k(value)
|
||||
@@ -853,7 +854,7 @@ def temperature(value):
|
||||
except Invalid:
|
||||
pass
|
||||
|
||||
raise orig_err # noqa
|
||||
raise err
|
||||
|
||||
|
||||
_color_temperature_mireds = float_with_unit("Color Temperature", r"(mireds|Mireds)")
|
||||
|
Reference in New Issue
Block a user