Skip to content

Commit

Permalink
file_manager: static type checking fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Arksine committed Apr 19, 2024
1 parent 44a5600 commit 9447494
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions moonraker/components/file_manager/file_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,13 @@
from ...confighelper import ConfigHelper
from ...common import WebRequest
from ..klippy_connection import KlippyConnection
from .. import database
from .. import klippy_apis
from .. import shell_command
from ..job_queue import JobQueue
from ..job_state import JobState
from ..secrets import Secrets
from ..klippy_apis import KlippyAPI as APIComp
from ..database import MoonrakerDatabase as DBComp
from ..shell_command import ShellCommandFactory as SCMDComp
StrOrPath = Union[str, pathlib.Path]
DBComp = database.MoonrakerDatabase
APIComp = klippy_apis.KlippyAPI
SCMDComp = shell_command.ShellCommandFactory
_T = TypeVar("_T")

VALID_GCODE_EXTS = ['.gcode', '.g', '.gco', '.ufp', '.nc']
Expand Down Expand Up @@ -1181,6 +1178,7 @@ async def wait_inotify_event(self, current_path: StrOrPath) -> None:
timeout = 1200. if has_pending else 1.
for _ in range(5):
try:
assert mcfut is not None
await asyncio.wait_for(asyncio.shield(mcfut), timeout)
except asyncio.TimeoutError:
if timeout > 2.:
Expand Down

0 comments on commit 9447494

Please sign in to comment.