Skip to content

Commit fa25262

Browse files
committed
fastmcp(fix): Format the converted transforms test
why: 9705776 updated the logger name in this test without reformatting it, so two lines exceeded the limit and ruff format failed every qa job. what: Reformat. No behaviour change.
1 parent 9705776 commit fa25262

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

‎tests/ext/fastmcp/test_transforms.py‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,19 @@ def test_resolve_tool_refs_warns_when_known_tool_has_no_canonical_home(
7777
caplog: pytest.LogCaptureFixture,
7878
) -> None:
7979
"""A known tool resolving to a foreign label (reserved ``search``) warns."""
80-
with caplog.at_level(logging.WARNING, logger="sphinx.sphinx_autodoc_fastmcp._transforms"):
80+
with caplog.at_level(
81+
logging.WARNING, logger="sphinx.sphinx_autodoc_fastmcp._transforms"
82+
):
8183
container = _resolve_single_tool_ref(
8284
reftarget="search",
8385
labels={"search": ("search", "", "Search Page")},
8486
tools={"search": object()},
8587
)
8688

8789
records = [
88-
r for r in caplog.records if r.name == "sphinx.sphinx_autodoc_fastmcp._transforms"
90+
r
91+
for r in caplog.records
92+
if r.name == "sphinx.sphinx_autodoc_fastmcp._transforms"
8993
]
9094
assert len(records) == 1
9195
message = records[0].getMessage()
@@ -99,7 +103,9 @@ def test_resolve_tool_refs_silent_when_canonical_label_present(
99103
caplog: pytest.LogCaptureFixture,
100104
) -> None:
101105
"""No warning when the canonical ``fastmcp-tool-<slug>`` label exists."""
102-
with caplog.at_level(logging.WARNING, logger="sphinx.sphinx_autodoc_fastmcp._transforms"):
106+
with caplog.at_level(
107+
logging.WARNING, logger="sphinx.sphinx_autodoc_fastmcp._transforms"
108+
):
103109
container = _resolve_single_tool_ref(
104110
reftarget="search",
105111
labels={
@@ -114,7 +120,9 @@ def test_resolve_tool_refs_silent_when_canonical_label_present(
114120
)
115121

116122
warnings = [
117-
r for r in caplog.records if r.name == "sphinx.sphinx_autodoc_fastmcp._transforms"
123+
r
124+
for r in caplog.records
125+
if r.name == "sphinx.sphinx_autodoc_fastmcp._transforms"
118126
]
119127
assert warnings == []
120128
reference = container[0]

0 commit comments

Comments
 (0)