Simple fix

This commit is contained in:
Matt Beton
2025-07-07 17:18:43 +01:00
committed by GitHub
parent 03a1cf59a6
commit 0425422f55
5 changed files with 8 additions and 6 deletions
-1
View File
@@ -66,7 +66,6 @@ only-include = ["pyproject.toml", "README.md"]
[tool.basedpyright]
typeCheckingMode = "strict"
failOnWarnings = true
stubPath = "stubs"
reportAny = "error"
reportUnknownVariableType = "error"
@@ -0,0 +1,3 @@
from mlx.nn.layers import *
from mlx.nn import init as init, losses as losses
from mlx.nn.utils import average_gradients as average_gradients, value_and_grad as value_and_grad
+1 -1
View File
@@ -11,7 +11,7 @@ from shared.openai import FinishReason
class MessageType(str, Enum):
Setup = 'setup'
ChatTask = "chat_task"
ChatTask = 'chat_task'
Exit = 'exit'
MT = TypeVar(name='MT', bound=MessageType)
+2 -2
View File
@@ -3,11 +3,11 @@ from collections.abc import Coroutine
import asyncio
from shared.types.events.events import ResourceProfiledEvent
from shared.types.events.events import ResourceProfiled
from shared.types.profiling.common import NodePerformanceProfile, MemoryPerformanceProfile, SystemPerformanceProfile
class EventLog:
def append(self, event: ResourceProfiledEvent) -> None:
def append(self, event: ResourceProfiled) -> None:
...
class ResourceCollector(ABC):
+2 -2
View File
@@ -2,7 +2,7 @@ from typing import Any, Type, TypeVar
T = TypeVar('T')
def ensure_type(obj: Any, expected_type: Type[T]) -> T:
def ensure_type(obj: Any, expected_type: Type[T]) -> T: # type: ignore
if not isinstance(obj, expected_type):
raise TypeError(f"Expected {expected_type}, got {type(obj)}")
raise TypeError(f"Expected {expected_type}, got {type(obj)}") # type: ignore
return obj