Jeremiah Lowin commited on
Commit
b031366
·
1 Parent(s): f0a0f92

Fix linting

Browse files
pyproject.toml CHANGED
@@ -114,3 +114,5 @@ extend-select = ["I", "UP"]
114
 
115
  [tool.ruff.lint.per-file-ignores]
116
  "__init__.py" = ["F401", "I001", "RUF013"]
 
 
 
114
 
115
  [tool.ruff.lint.per-file-ignores]
116
  "__init__.py" = ["F401", "I001", "RUF013"]
117
+ # allow imports not at the top of the file
118
+ "src/fastmcp/__init__.py" = ["E402"]
tests/deprecated/test_server_init_kwargs.py CHANGED
@@ -199,7 +199,7 @@ class TestDeprecatedServerInitKwargs:
199
  """Test that None values for deprecated kwargs don't raise warnings."""
200
  with warnings.catch_warnings(record=True) as recorded_warnings:
201
  warnings.simplefilter("always")
202
- server = FastMCP(
203
  "TestServer",
204
  log_level=None,
205
  debug=None,
@@ -290,10 +290,7 @@ class TestDeprecatedServerInitKwargs:
290
  with warnings.catch_warnings(record=True) as recorded_warnings:
291
  warnings.simplefilter("always")
292
 
293
- def create_server_with_deprecated_kwargs():
294
- return FastMCP("TestServer", log_level="DEBUG")
295
-
296
- server = create_server_with_deprecated_kwargs()
297
 
298
  # Should have exactly one deprecation warning
299
  deprecation_warnings = [
 
199
  """Test that None values for deprecated kwargs don't raise warnings."""
200
  with warnings.catch_warnings(record=True) as recorded_warnings:
201
  warnings.simplefilter("always")
202
+ FastMCP(
203
  "TestServer",
204
  log_level=None,
205
  debug=None,
 
290
  with warnings.catch_warnings(record=True) as recorded_warnings:
291
  warnings.simplefilter("always")
292
 
293
+ FastMCP("TestServer", log_level="DEBUG")
 
 
 
294
 
295
  # Should have exactly one deprecation warning
296
  deprecation_warnings = [