Skip to content

Commit 6b2872c

Browse files
committed
fix: Resolve pyright errors in test_integration.py
- Add individual pyright ignore comments for each dynamic import - These imports work correctly at runtime in multiprocessing context - Remove exclude rule from pre-commit config as it's no longer needed - Apply ruff formatting to updated file This resolves the final pre-commit pyright failures.
1 parent 219c7c2 commit 6b2872c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tests/server/fastmcp/test_integration.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,17 @@ def run_server_with_transport(module_name: str, port: int, transport: str) -> No
8484
sys.path.insert(0, os.path.abspath(snippets_path))
8585

8686
# Import the servers module in the multiprocessing context
87-
from servers import ( # type: ignore
88-
basic_prompt,
89-
basic_resource,
90-
basic_tool,
91-
completion,
92-
elicitation,
93-
fastmcp_quickstart,
94-
notifications,
95-
sampling,
96-
structured_output,
97-
tool_progress,
87+
from servers import ( # pyright: ignore[reportAttributeAccessIssue]
88+
basic_prompt, # pyright: ignore[reportAttributeAccessIssue]
89+
basic_resource, # pyright: ignore[reportAttributeAccessIssue]
90+
basic_tool, # pyright: ignore[reportAttributeAccessIssue]
91+
completion, # pyright: ignore[reportAttributeAccessIssue]
92+
elicitation, # pyright: ignore[reportAttributeAccessIssue]
93+
fastmcp_quickstart, # pyright: ignore[reportAttributeAccessIssue]
94+
notifications, # pyright: ignore[reportAttributeAccessIssue]
95+
sampling, # pyright: ignore[reportAttributeAccessIssue]
96+
structured_output, # pyright: ignore[reportAttributeAccessIssue]
97+
tool_progress, # pyright: ignore[reportAttributeAccessIssue]
9898
)
9999

100100
# Get the MCP instance based on module name

0 commit comments

Comments
 (0)