fastmcp/tests
William Easton c1e154ad66
Use abstract types for FastMCP class instantiation (#2219)
* feat: use abstract collection types in FastMCP.__init__

Use Sequence, Collection, and Mapping from collections.abc for more
flexible typing in FastMCP.__init__ parameters. This allows downstream
developers to pass tuples, sets, and other collection types instead of
being restricted to list and dict.

Changes:
- middleware: list -> Sequence (converted to list internally)
- tools: list -> Sequence
- tool_transformations: dict -> Mapping (ToolManager updated)
- include_tags: set -> Collection
- exclude_tags: set -> Collection
- dependencies: kept as list per maintainer request

Closes #2212

Co-authored-by: William Easton <strawgate@users.noreply.github.com>

* Concrete types in class inits

* Small imports cleanup

* Fix include/exclude tag handling

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: William Easton <strawgate@users.noreply.github.com>
2025-10-24 17:50:07 -04:00
..
cli Replace subprocess tests with in-process async servers (#2006) 2025-10-19 10:47:54 -04:00
client Replace subprocess tests with in-process async servers (#2006) 2025-10-19 10:47:54 -04:00
contrib feat: Add title, annotations and meta to mixin decorators 2025-10-10 14:23:02 +05:30
deprecated feat: introduce fastmcp.json configuration system (#1517) 2025-08-19 16:06:04 -04:00
experimental Mark test_github_api_schema_performance as integration test 2025-10-24 20:59:55 +00:00
integration_tests Replace subprocess tests with in-process async servers (#2006) 2025-10-19 10:47:54 -04:00
prompts Enable more type checking rules (#1775) 2025-09-07 11:11:44 -04:00
resources Allow direct instantiation of Prompt and Resource classes (#2031) 2025-10-08 21:06:41 -04:00
server Use abstract types for FastMCP class instantiation (#2219) 2025-10-24 17:50:07 -04:00
tools Add Pydantic-compatible input validation (#2073) 2025-10-14 11:49:30 -07:00
utilities Implement icon support (#2121) 2025-10-17 17:28:08 -04:00
__init__.py Update type handling for resources 2024-11-29 19:42:46 -05:00
conftest.py Add platform-aware OAuth token persistence (#2218) 2025-10-22 20:42:24 -04:00
test_examples.py Cleanup content conversion 2025-09-06 17:32:33 -05:00
test_mcp_config.py optimize test suite (#1893) 2025-09-22 20:07:04 -04:00