Fix type errors
This commit is contained in:
@@ -657,7 +657,6 @@ class Adapter(abc.ABC):
|
||||
only be ``True`` if :class:`supports_streaming` returns ``True``.
|
||||
:returns: The URI for the given song.
|
||||
"""
|
||||
# TODO (#189)
|
||||
raise self._check_can_error("get_song_uri")
|
||||
|
||||
def get_song_details(self, song_id: str) -> Song:
|
||||
|
@@ -29,11 +29,15 @@ encoder_functions = {
|
||||
|
||||
for type_, translation_function in decoder_functions.items():
|
||||
dataclasses_json.cfg.global_config.decoders[type_] = translation_function
|
||||
dataclasses_json.cfg.global_config.decoders[Optional[type_]] = translation_function
|
||||
dataclasses_json.cfg.global_config.decoders[
|
||||
Optional[type_] # type: ignore
|
||||
] = translation_function
|
||||
|
||||
for type_, translation_function in encoder_functions.items():
|
||||
dataclasses_json.cfg.global_config.encoders[type_] = translation_function
|
||||
dataclasses_json.cfg.global_config.encoders[Optional[type_]] = translation_function
|
||||
dataclasses_json.cfg.global_config.encoders[
|
||||
Optional[type_] # type: ignore
|
||||
] = translation_function
|
||||
|
||||
|
||||
@dataclass_json(letter_case=LetterCase.CAMEL)
|
||||
|
@@ -18,7 +18,9 @@ def encode_path(path: Path) -> str:
|
||||
|
||||
|
||||
dataclasses_json.cfg.global_config.decoders[Path] = Path
|
||||
dataclasses_json.cfg.global_config.decoders[Optional[Path]] = (
|
||||
dataclasses_json.cfg.global_config.decoders[
|
||||
Optional[Path] # type: ignore
|
||||
] = (
|
||||
lambda p: Path(p) if p else None
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user