mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52: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:
|
||||
self.col = col.weakref()
|
||||
self._dir: Optional[str] = None
|
||||
if server:
|
||||
self._dir = None
|
||||
return
|
||||
# media directory
|
||||
self._dir = media_paths_from_col_path(self.col.path)[0]
|
||||
|
@ -82,7 +82,7 @@ class MediaManager:
|
|||
# may have been deleted
|
||||
pass
|
||||
|
||||
def dir(self) -> Any:
|
||||
def dir(self) -> Optional[str]:
|
||||
return self._dir
|
||||
|
||||
def force_resync(self) -> None:
|
||||
|
|
Loading…
Reference in a new issue