diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 74e3541da..548696b55 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,3 +39,10 @@ repos: - id: no-commit-to-branch name: prevent commits to main args: [--branch, main] + + - repo: https://github.com/codespell-project/codespell + rev: v2.4.1 + hooks: + - id: codespell # See pyproject.toml for args + additional_dependencies: + - tomli diff --git a/docs/changelog.mdx b/docs/changelog.mdx index 00f60cd2c..e1b99bd46 100644 --- a/docs/changelog.mdx +++ b/docs/changelog.mdx @@ -1757,7 +1757,7 @@ This release is highlighted by the ability to handle complex JSON objects as MCP ### New Features 🎉 * Set up multiple os tests by [@jlowin](https://github.com/jlowin) in [#44](https://github.com/jlowin/fastmcp/pull/44) -* Changes to accomodate windows users. by [@justjoehere](https://github.com/justjoehere) in [#42](https://github.com/jlowin/fastmcp/pull/42) +* Changes to accommodate windows users. by [@justjoehere](https://github.com/justjoehere) in [#42](https://github.com/jlowin/fastmcp/pull/42) * Handle complex inputs by [@jurasofish](https://github.com/jurasofish) in [#31](https://github.com/jlowin/fastmcp/pull/31) ### Docs 📚 diff --git a/pyproject.toml b/pyproject.toml index e02376c8b..28e644427 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -141,3 +141,6 @@ extend-select = ["I", "UP"] "__init__.py" = ["F401", "I001", "RUF013"] # allow imports not at the top of the file "src/fastmcp/__init__.py" = ["E402"] + +[tool.codespell] +ignore-words-list = "asend,shttp,te" diff --git a/src/fastmcp/contrib/mcp_mixin/README.md b/src/fastmcp/contrib/mcp_mixin/README.md index e02d57cba..0742d7b6a 100644 --- a/src/fastmcp/contrib/mcp_mixin/README.md +++ b/src/fastmcp/contrib/mcp_mixin/README.md @@ -91,12 +91,12 @@ class MyComponent(MCPMixin): # prompt @mcp_prompt(name="A prompt") def prompt_method(self, name): - return f"Whats up {name}?" + return f"What's up {name}?" # disabled prompt @mcp_prompt(name="A prompt", enabled=False) def prompt_method(self, name): - return f"Whats up {name}?" + return f"What's up {name}?" mcp_server = FastMCP() component = MyComponent() diff --git a/tests/client/test_client.py b/tests/client/test_client.py index bae0ca81f..b521a8cdc 100644 --- a/tests/client/test_client.py +++ b/tests/client/test_client.py @@ -457,12 +457,12 @@ async def test_client_nested_context_manager(fastmcp_server): assert client._session_state.session is not None session = client._session_state.session - # Re-use the same session + # Reuse the same session async with client: assert client.is_connected() assert client._session_state.session is session - # Re-use the same session + # Reuse the same session async with client: assert client.is_connected() assert client._session_state.session is session