fastmcp/tests/resources
Jeremiah Lowin 07750efaab
Fix type errors for ty 0.0.1-alpha.31 upgrade (#2561)
* Fix type errors for ty 0.0.1-alpha.31 upgrade

Add type ignores and fixes for ty's stricter checking:
- Path(None) guards in cli.py
- isinstance checks for ElicitRequestFormParams (URL elicitation support)
- TODO(ty) comments for match/isinstance narrowing bugs
- Method override type ignores for generic covariance
- Starlette Middleware typing workarounds
- Dynamic type construction ignores in json_schema_type.py

* Fix remaining type errors for ty 0.0.1-alpha.31

- Add asserts for optional attribute access in tests
- Add type ignores for dynamic httpx transport internals
- Add TODO(ty) comments for `in` operator on str|bytes
- Add TODO(ty) comments for Starlette Middleware typing
- Use cast for prompt.fn async validation in server.py

* Upgrade ty to 0.0.1-alpha.31

Fixes additional test file type errors discovered after upgrade.
2025-12-05 21:29:14 -05:00
..
__init__.py restore 1.x code 2025-04-09 11:54:42 -04:00
test_file_resources.py Update test typing 2025-05-31 20:41:18 -04:00
test_function_resources.py Fix single-element list unwrapping in tool content 2025-07-07 12:07:16 -04:00
test_resource_manager.py Fix query-only resource templates not matching URIs without query strings (#2323) 2025-11-01 11:27:37 -04:00
test_resource_template.py Fix type errors for ty 0.0.1-alpha.31 upgrade (#2561) 2025-12-05 21:29:14 -05:00
test_resource_template_meta.py Add meta parameter support to tools, resources, templates, and prompts decorators (#1294) 2025-07-29 17:16:05 -04:00
test_resources.py Allow direct instantiation of Prompt and Resource classes (#2031) 2025-10-08 21:06:41 -04:00