mirror of
https://github.com/home-assistant/core.git
synced 2026-08-03 20:24:55 +02:00
Enable ruff rule FURB192 (sorted-min-max) (#177544)
This commit is contained in:
@@ -189,9 +189,7 @@ class WithingsSleepDataUpdateCoordinator(
|
||||
if not response:
|
||||
return None
|
||||
|
||||
return sorted(
|
||||
response, key=lambda sleep_summary: sleep_summary.end_date, reverse=True
|
||||
)[0]
|
||||
return max(response, key=lambda sleep_summary: sleep_summary.end_date)
|
||||
|
||||
|
||||
class WithingsBedPresenceDataUpdateCoordinator(WithingsDataUpdateCoordinator[None]):
|
||||
|
||||
@@ -784,7 +784,6 @@ ignore = [
|
||||
# Disabled to implement in follow up PRs after ruff 0.16 bump
|
||||
"ISC004",
|
||||
"LOG004",
|
||||
"FURB192",
|
||||
]
|
||||
|
||||
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
|
||||
|
||||
Reference in New Issue
Block a user