general: deprecate some old methods by hiding behind TYPE_CHECKING
This commit is contained in:
parent
79ce8e84ec
commit
d6786084ca
4 changed files with 17 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
|||
from typing import NamedTuple, List, Iterable
|
||||
from typing import NamedTuple, List, Iterable, TYPE_CHECKING
|
||||
|
||||
from ..core import datetime_aware, Res, LazyLogger
|
||||
from ..core.compat import removeprefix
|
||||
|
@ -99,7 +99,9 @@ def stats() -> Stats:
|
|||
|
||||
### deprecated stuff (keep in my.media.youtube)
|
||||
|
||||
get_watched = watched
|
||||
if not TYPE_CHECKING:
|
||||
# "deprecate" by hiding from mypy
|
||||
get_watched = watched
|
||||
|
||||
|
||||
def _watched_legacy() -> Iterable[Watched]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue