mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 04:50:05 +00:00
Improve type hints in core helper tests (#120096)
This commit is contained in:
@@ -7,7 +7,7 @@ import math
|
||||
import os
|
||||
from pathlib import Path
|
||||
import time
|
||||
from typing import NamedTuple
|
||||
from typing import Any, NamedTuple
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
import pytest
|
||||
@@ -325,10 +325,10 @@ def test_find_unserializable_data() -> None:
|
||||
) == {"$[0](Event: bad_event).data.bad_attribute": bad_data}
|
||||
|
||||
class BadData:
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
self.bla = bad_data
|
||||
|
||||
def as_dict(self):
|
||||
def as_dict(self) -> dict[str, Any]:
|
||||
return {"bla": self.bla}
|
||||
|
||||
assert find_paths_unserializable_data(
|
||||
|
||||
Reference in New Issue
Block a user