mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
add type hint for media dir
This commit is contained in:
parent
63201d450d
commit
c6ec9e44e4
1 changed files with 2 additions and 2 deletions
|
@ -44,8 +44,8 @@ class MediaManager:
|
||||||
|
|
||||||
def __init__(self, col: anki.collection.Collection, server: bool) -> None:
|
def __init__(self, col: anki.collection.Collection, server: bool) -> None:
|
||||||
self.col = col.weakref()
|
self.col = col.weakref()
|
||||||
|
self._dir: Optional[str] = None
|
||||||
if server:
|
if server:
|
||||||
self._dir = None
|
|
||||||
return
|
return
|
||||||
# media directory
|
# media directory
|
||||||
self._dir = media_paths_from_col_path(self.col.path)[0]
|
self._dir = media_paths_from_col_path(self.col.path)[0]
|
||||||
|
@ -82,7 +82,7 @@ class MediaManager:
|
||||||
# may have been deleted
|
# may have been deleted
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def dir(self) -> Any:
|
def dir(self) -> Optional[str]:
|
||||||
return self._dir
|
return self._dir
|
||||||
|
|
||||||
def force_resync(self) -> None:
|
def force_resync(self) -> None:
|
||||||
|
|
Loading…
Reference in a new issue