refactor: improve lifespan context typing and documentation
- Add proper generic parameter for lifespan context type - Update README with TypedDict example for strong typing - Fix context variable initialization in server - Improve property return type safety - Remove redundant documentation - Ensure compatibility with existing tests
This commit is contained in:
parent
fddba00723
commit
4d3e05f6f6
1 changed files with 22 additions and 16 deletions
|
|
@ -100,7 +100,7 @@ class Settings(BaseSettings, Generic[LifespanResultT]):
|
|||
|
||||
lifespan: (
|
||||
Callable[["FastMCP"], AbstractAsyncContextManager[LifespanResultT]] | None
|
||||
) = Field(None, description="Lifespan contexte manager")
|
||||
) = Field(None, description="Lifespan context manager")
|
||||
|
||||
|
||||
def lifespan_wrapper(
|
||||
|
|
|
|||
Loading…
Reference in a new issue