chore: add ty + pre-commit hook and repeal even more ruff rules (#9504)
* auto fixes * auto fix pt2 and transitive deps and undefined var checking locals() * manual fixes (ignored or letta-code fixed) * fix circular import * remove all ignores, add FastAPI rules and Ruff rules * add ty and precommit * ruff stuff * ty check fixes * ty check fixes pt 2 * error on invalid
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import json
|
||||
from datetime import datetime, timezone
|
||||
from enum import Enum
|
||||
from typing import Annotated, List, Literal, Optional, Union
|
||||
from typing import Annotated, ClassVar, List, Literal, Optional, Union
|
||||
|
||||
from pydantic import BaseModel, Field, field_serializer, field_validator
|
||||
|
||||
@@ -246,7 +246,7 @@ class ToolCallMessage(LettaMessage):
|
||||
return data
|
||||
|
||||
class Config:
|
||||
json_encoders = {
|
||||
json_encoders: ClassVar[dict] = {
|
||||
ToolCallDelta: lambda v: v.model_dump(exclude_none=True),
|
||||
ToolCall: lambda v: v.model_dump(exclude_none=True),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user