mirror of
https://github.com/home-assistant/core.git
synced 2025-04-19 14:57:52 +00:00
Enable Ruff B024 (#136088)
This commit is contained in:
parent
3f8f206c53
commit
83b0d5a0b9
@ -2,7 +2,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from abc import ABC
|
||||
from dataclasses import dataclass
|
||||
from typing import Any, cast
|
||||
|
||||
@ -102,7 +101,7 @@ class MediaSourceItem:
|
||||
return cls(hass, domain, identifier, target_media_player)
|
||||
|
||||
|
||||
class MediaSource(ABC):
|
||||
class MediaSource:
|
||||
"""Represents a source of media files."""
|
||||
|
||||
name: str | None = None
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from abc import abstractmethod
|
||||
import asyncio
|
||||
from collections.abc import Awaitable, Callable, Coroutine, Iterable
|
||||
from dataclasses import dataclass
|
||||
@ -126,7 +126,7 @@ class CollectionEntity(Entity):
|
||||
"""Handle updated configuration."""
|
||||
|
||||
|
||||
class ObservableCollection[_ItemT](ABC):
|
||||
class ObservableCollection[_ItemT]:
|
||||
"""Base collection type that can be observed."""
|
||||
|
||||
def __init__(self, id_manager: IDManager | None) -> None:
|
||||
|
@ -719,6 +719,7 @@ select = [
|
||||
"B017", # pytest.raises(BaseException) should be considered evil
|
||||
"B018", # Found useless attribute access. Either assign it to a variable or remove it.
|
||||
"B023", # Function definition does not bind loop variable {name}
|
||||
"B024", # `{name}` is an abstract base class, but it has no abstract methods or properties
|
||||
"B026", # Star-arg unpacking after a keyword argument is strongly discouraged
|
||||
"B032", # Possible unintentional type annotation (using :). Did you mean to assign (using =)?
|
||||
"B904", # Use raise from to specify exception cause
|
||||
|
Loading…
x
Reference in New Issue
Block a user