mirror of
https://github.com/beetbox/beets.git
synced 2025-12-14 20:43:41 +01:00
Define keys as strings in typing
This commit is contained in:
parent
167866d2d4
commit
5388743b84
1 changed files with 3 additions and 3 deletions
|
|
@ -86,7 +86,7 @@ class FormattedMapping(Mapping):
|
|||
else:
|
||||
raise KeyError(key)
|
||||
|
||||
def __iter__(self) -> Iterable:
|
||||
def __iter__(self) -> Iterable[str]:
|
||||
return iter(self.model_keys)
|
||||
|
||||
def __len__(self) -> int:
|
||||
|
|
@ -161,7 +161,7 @@ class LazyConvertDict:
|
|||
if key in self.data:
|
||||
del self.data[key]
|
||||
|
||||
def keys(self) -> List:
|
||||
def keys(self) -> List[str]:
|
||||
"""Get a list of available field names for this object.
|
||||
"""
|
||||
return list(self._converted.keys()) + list(self.data.keys())
|
||||
|
|
@ -203,7 +203,7 @@ class LazyConvertDict:
|
|||
"""
|
||||
return key in self.keys()
|
||||
|
||||
def __iter__(self) -> Iterable:
|
||||
def __iter__(self) -> Iterable[str]:
|
||||
"""Iterate over the available field names (excluding computed
|
||||
fields).
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue