drop 3.8, add pytest-retry (#592)

* drop 3.8, add pytest-retry

* fix mypy

* fix missing import
This commit is contained in:
sigma67 2024-07-13 20:40:50 +02:00 • committed by GitHub
commit 828b1b9810
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 321 additions and 362 deletions

View file

@ -1,6 +1,6 @@
"""commonly used navigation paths"""
from typing import Any, Dict, List, Literal, Optional, overload
from typing import Any, Literal, Optional, overload
CONTENT = ["contents", 0]
RUN_TEXT = ["runs", 0, "text"]
@ -90,16 +90,16 @@ FRAMEWORK_MUTATIONS = ["frameworkUpdates", "entityBatchUpdate", "mutations"]
@overload
def nav(root: Dict[str, Any], items: List[Any], none_if_absent: Literal[False] = False) -> Any:
def nav(root: dict[str, Any], items: list[Any], none_if_absent: Literal[False] = False) -> Any:
"""overload for mypy only"""
@overload
def nav(root: Dict, items: List[Any], none_if_absent: Literal[True] = True) -> Optional[Any]:
def nav(root: dict, items: list[Any], none_if_absent: Literal[True] = True) -> Optional[Any]:
"""overload for mypy only"""
def nav(root: Dict, items: List[Any], none_if_absent: bool = False) -> Optional[Any]:
def nav(root: dict, items: list[Any], none_if_absent: bool = False) -> Optional[Any]:
"""Access a nested object in root by item sequence."""
try:
for k in items: