mirror of
https://github.com/esphome/esphome.git
synced 2025-09-16 10:12:21 +01:00
[ruff] Enable FURB rules for code modernization (#9896)
This commit is contained in:
@@ -51,8 +51,7 @@ DISPLAY_ROTATIONS = {
|
||||
|
||||
def validate_rotation(value):
|
||||
value = cv.string(value)
|
||||
if value.endswith("°"):
|
||||
value = value[:-1]
|
||||
value = value.removesuffix("°")
|
||||
return cv.enum(DISPLAY_ROTATIONS, int=True)(value)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user