Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 83b0d5a

Browse files
Enable Ruff B024 (home-assistant#136088)
1 parent 3f8f206 commit 83b0d5a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

‎homeassistant/components/media_source/models.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from __future__ import annotations
44

5-
from abc import ABC
65
from dataclasses import dataclass
76
from typing import Any, cast
87

@@ -102,7 +101,7 @@ def from_uri(
102101
return cls(hass, domain, identifier, target_media_player)
103102

104103

105-
class MediaSource(ABC):
104+
class MediaSource:
106105
"""Represents a source of media files."""
107106

108107
name: str | None = None

‎homeassistant/helpers/collection.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from abc import ABC, abstractmethod
5+
from abc import abstractmethod
66
import asyncio
77
from collections.abc import Awaitable, Callable, Coroutine, Iterable
88
from dataclasses import dataclass
@@ -126,7 +126,7 @@ async def async_update_config(self, config: ConfigType) -> None:
126126
"""Handle updated configuration."""
127127

128128

129-
class ObservableCollection[_ItemT](ABC):
129+
class ObservableCollection[_ItemT]:
130130
"""Base collection type that can be observed."""
131131

132132
def __init__(self, id_manager: IDManager | None) -> None:

‎pyproject.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,7 @@ select = [
719719
"B017", # pytest.raises(BaseException) should be considered evil
720720
"B018", # Found useless attribute access. Either assign it to a variable or remove it.
721721
"B023", # Function definition does not bind loop variable {name}
722+
"B024", # `{name}` is an abstract base class, but it has no abstract methods or properties
722723
"B026", # Star-arg unpacking after a keyword argument is strongly discouraged
723724
"B032", # Possible unintentional type annotation (using :). Did you mean to assign (using =)?
724725
"B904", # Use raise from to specify exception cause

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /