diff --git a/rich/json.py b/rich/json.py index bc141933a..214cd32b7 100644 --- a/rich/json.py +++ b/rich/json.py @@ -32,7 +32,7 @@ def from_data(cls, data: Any, indent: int = 4, highlight: bool = True) -> "JSON" indent (int, optional): Number of characters to indent by. Defaults to True. highlight (bool, optional): Enable highlighting. Defaults to True. """ - json_instance = cls.__new__(cls) + json_instance: "JSON" = cls.__new__(cls) json = dumps(data, indent=indent) highlighter = JSONHighlighter() if highlight else NullHighlighter() json_instance.text = highlighter(json)