mirror of
https://github.com/esphome/esphome.git
synced 2025-10-27 21:23:48 +00:00
[ruff] Enable FURB rules for code modernization (#9896)
This commit is contained in:
@@ -155,8 +155,7 @@ def _read_audio_file_and_type(file_config):
|
||||
import puremagic
|
||||
|
||||
file_type: str = puremagic.from_string(data)
|
||||
if file_type.startswith("."):
|
||||
file_type = file_type[1:]
|
||||
file_type = file_type.removeprefix(".")
|
||||
|
||||
media_file_type = audio.AUDIO_FILE_TYPE_ENUM["NONE"]
|
||||
if file_type in ("wav"):
|
||||
|
||||
Reference in New Issue
Block a user