Fix type hint for older py versions

This commit is contained in:
Ivan Habunek 2023-06-26 16:58:11 +02:00
parent 0662a7616b
commit 0c89445b61
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95
1 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import os
import re
import shutil
import subprocess
from typing import List
import urwid
from datetime import datetime, timezone
@ -181,7 +182,7 @@ def get_max_toot_chars(instance, default=500):
return default
def deep_get(adict: dict, path: list[str], default=None):
def deep_get(adict: dict, path: List[str], default=None):
return reduce(
lambda d, key: d.get(key, default) if isinstance(d, dict) else default,
path,