11import typing
2- from typing import Any , Union , Tuple , Dict , List
2+ from typing import Any , Union , Tuple , Dict , List , Mapping , Sequence
33
44from PyQt5 .QtCore import QSettings
55
66if typing .TYPE_CHECKING : # pragma: no cover
7- _T = typing .TypeVar ("T " )
7+ _T = typing .TypeVar ("_T " )
88 #: Specification for an value in the return value of readArray
99 #: Can be single type or a tuple of (type, defaultValue) where default
1010 #: value is used where a stored entry is missing.
1414
1515
1616def QSettings_readArray (settings , key , scheme ):
17- # type: (QSettings, str, Dict [str, ValueSpec]) -> List[Dict[str, Any]]
17+ # type: (QSettings, str, Mapping [str, ValueSpec]) -> List[Dict[str, Any]]
1818 """
1919 Read the whole array from a QSettings instance.
2020
@@ -61,7 +61,7 @@ def normalize_spec(spec):
6161
6262
6363def QSettings_writeArray (settings , key , values ):
64- # type: (QSettings, str, List[Dict [str, Any]]) -> None
64+ # type: (QSettings, str, Sequence[Mapping [str, Any]]) -> None
6565 """
6666 Write an array of values to a QSettings instance.
6767
@@ -87,7 +87,7 @@ def QSettings_writeArray(settings, key, values):
8787
8888
8989def QSettings_writeArrayItem (settings , key , index , item , arraysize ):
90- # type: (QSettings, str, int, Dict [str, Any], int) -> None
90+ # type: (QSettings, str, int, Mapping [str, Any], int) -> None
9191 """
9292 Write/update an array item at index.
9393
0 commit comments