Improve type hints in core helper tests (#120096)

This commit is contained in:
epenet 2024-06-21 15:43:27 +02:00 committed by GitHub
parent 4aecd23f1d
commit 648ef94888
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 71 additions and 59 deletions

View file

@ -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(