Merge pull request #986 from CfirTsabari/cfir/update_hints

Fix type hints for FunctionResource:fn
This commit is contained in:
Jeremiah Lowin 2025-06-29 10:10:50 -04:00 committed by GitHub
commit ed5e2d7845
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -62,7 +62,7 @@ class Resource(FastMCPComponent, abc.ABC):
@staticmethod
def from_function(
fn: Callable[[], Any],
fn: Callable[..., Any],
uri: str | AnyUrl,
name: str | None = None,
title: str | None = None,
@ -144,12 +144,12 @@ class FunctionResource(Resource):
- other types will be converted to JSON
"""
fn: Callable[[], Any]
fn: Callable[..., Any]
@classmethod
def from_function(
cls,
fn: Callable[[], Any],
fn: Callable[..., Any],
uri: str | AnyUrl,
name: str | None = None,
title: str | None = None,