Fix typos discovered by codespell (#1922)

This commit is contained in:
Christian Clauss 2025-09-26 18:02:28 +02:00 committed by GitHub
commit d6aa980ff5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 15 additions and 5 deletions

View file

@ -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

View file

@ -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 📚

View file

@ -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"

View file

@ -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()

View file

@ -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