Cleanup: fix mypy errors
This mostly handles a mypy change where implicit optionals (i.e. things like `size: int = None`) are no longer allowed. No functional changes.
This commit is contained in:
@@ -25,6 +25,7 @@ import logging
|
||||
import pathlib
|
||||
import queue
|
||||
import typing
|
||||
from typing import Optional
|
||||
|
||||
import blender_asset_tracer.trace.progress
|
||||
|
||||
@@ -134,7 +135,7 @@ class ThreadSafeCallback(Callback):
|
||||
def missing_file(self, filename: pathlib.Path) -> None:
|
||||
self._queue(self.wrapped.missing_file, filename)
|
||||
|
||||
def flush(self, timeout: float = None) -> None:
|
||||
def flush(self, timeout: Optional[float] = None) -> None:
|
||||
"""Call the queued calls, call this in the main thread."""
|
||||
|
||||
while True:
|
||||
|
||||
@@ -25,6 +25,7 @@ import queue
|
||||
import threading
|
||||
import time
|
||||
import typing
|
||||
from typing import Optional
|
||||
|
||||
from . import progress
|
||||
|
||||
@@ -186,7 +187,7 @@ class FileTransferer(threading.Thread, metaclass=abc.ABCMeta):
|
||||
if self.done.is_set():
|
||||
return
|
||||
|
||||
def join(self, timeout: float = None) -> None:
|
||||
def join(self, timeout: Optional[float] = None) -> None:
|
||||
"""Wait for the transfer to finish/stop."""
|
||||
|
||||
if timeout:
|
||||
|
||||
Reference in New Issue
Block a user