Bump Ruff to 0.5.3 (#122167)
parent
0b691f9393
commit
4620a54582
|
@ -1,6 +1,6 @@
|
|||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.5.2
|
||||
rev: v0.5.3
|
||||
hooks:
|
||||
- id: ruff
|
||||
args:
|
||||
|
|
|
@ -326,10 +326,7 @@ class PrometheusMetrics:
|
|||
return "".join(
|
||||
[
|
||||
c
|
||||
if c in string.ascii_letters
|
||||
or c in string.digits
|
||||
or c == "_"
|
||||
or c == ":"
|
||||
if c in string.ascii_letters + string.digits + "_:"
|
||||
else f"u{hex(ord(c))}"
|
||||
for c in metric
|
||||
]
|
||||
|
|
|
@ -149,8 +149,7 @@ class RokuMediaPlayer(RokuEntity, MediaPlayerEntity):
|
|||
return None
|
||||
|
||||
if (
|
||||
self.coordinator.data.app.name == "Power Saver"
|
||||
or self.coordinator.data.app.name == "Roku"
|
||||
self.coordinator.data.app.name in {"Power Saver", "Roku"}
|
||||
or self.coordinator.data.app.screensaver
|
||||
):
|
||||
return MediaPlayerState.IDLE
|
||||
|
|
|
@ -128,14 +128,9 @@ async def async_attach_trigger(
|
|||
(prev_value, prev_value_raw, from_value),
|
||||
(curr_value, curr_value_raw, to_value),
|
||||
):
|
||||
if (
|
||||
match != MATCH_ALL
|
||||
and value_to_eval != match
|
||||
and not (
|
||||
isinstance(match, list)
|
||||
and (value_to_eval in match or raw_value_to_eval in match)
|
||||
)
|
||||
and raw_value_to_eval != match
|
||||
if match not in (MATCH_ALL, value_to_eval, raw_value_to_eval) and not (
|
||||
isinstance(match, list)
|
||||
and (value_to_eval in match or raw_value_to_eval in match)
|
||||
):
|
||||
return
|
||||
|
||||
|
|
|
@ -693,7 +693,7 @@ exclude_lines = [
|
|||
]
|
||||
|
||||
[tool.ruff]
|
||||
required-version = ">=0.5.2"
|
||||
required-version = ">=0.5.3"
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Automatically generated from .pre-commit-config.yaml by gen_requirements_all.py, do not edit
|
||||
|
||||
codespell==2.3.0
|
||||
ruff==0.5.2
|
||||
ruff==0.5.3
|
||||
yamllint==1.35.1
|
||||
|
|
|
@ -35,15 +35,16 @@ CAMERA_SWITCHES_BASIC = [
|
|||
for d in CAMERA_SWITCHES
|
||||
if (
|
||||
not d.name.startswith("Detections:")
|
||||
and d.name != "SSH enabled"
|
||||
and d.name != "Color night vision"
|
||||
and d.name != "Tracking: person"
|
||||
and d.name != "HDR mode"
|
||||
and d.name
|
||||
not in {"SSH enabled", "Color night vision", "Tracking: person", "HDR mode"}
|
||||
)
|
||||
or d.name == "Detections: motion"
|
||||
or d.name == "Detections: person"
|
||||
or d.name == "Detections: vehicle"
|
||||
or d.name == "Detections: animal"
|
||||
or d.name
|
||||
in {
|
||||
"Detections: motion",
|
||||
"Detections: person",
|
||||
"Detections: vehicle",
|
||||
"Detections: animal",
|
||||
}
|
||||
]
|
||||
CAMERA_SWITCHES_NO_EXTRA = [
|
||||
d
|
||||
|
|
Loading…
Reference in New Issue