mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 05:24:18 +02:00
Merge pull request #986 from CfirTsabari/cfir/update_hints
Fix type hints for FunctionResource:fn
This commit is contained in:
commit
ed5e2d7845
1 changed files with 3 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue