mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-19 03:54:18 +02:00
Update test_types.py
This commit is contained in:
parent
d8c881bf21
commit
49d7bc92ff
1 changed files with 11 additions and 0 deletions
|
|
@ -245,3 +245,14 @@ class TestFindKwargByType:
|
|||
pass
|
||||
|
||||
assert find_kwarg_by_type(func, BaseClass) == "b"
|
||||
|
||||
def test_nonstandard_annotation(self):
|
||||
"""Test finding parameter with a nonstandard annotation like an
|
||||
instance. This is irregular."""
|
||||
|
||||
SENTINEL = object()
|
||||
|
||||
def func(a: int, b: SENTINEL, c: str): # type: ignore
|
||||
pass
|
||||
|
||||
assert find_kwarg_by_type(func, SENTINEL) is None # type: ignore
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue