refactor: move inline imports to module level (#1893)
This commit is contained in:
parent
c06362126b
commit
5d80f4efc8
2 changed files with 58 additions and 122 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import argparse
|
||||
import logging
|
||||
import sys
|
||||
import warnings
|
||||
from functools import partial
|
||||
from urllib.parse import urlparse
|
||||
|
||||
|
|
@ -15,8 +16,6 @@ from mcp.shared.message import SessionMessage
|
|||
from mcp.shared.session import RequestResponder
|
||||
|
||||
if not sys.warnoptions:
|
||||
import warnings
|
||||
|
||||
warnings.simplefilter("ignore")
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ Provides OAuth providers for machine-to-machine authentication flows:
|
|||
"""
|
||||
|
||||
import time
|
||||
import warnings
|
||||
from collections.abc import Awaitable, Callable
|
||||
from typing import Any, Literal
|
||||
from uuid import uuid4
|
||||
|
|
@ -409,8 +410,6 @@ class RFC7523OAuthClientProvider(OAuthClientProvider):
|
|||
timeout: float = 300.0,
|
||||
jwt_parameters: JWTParameters | None = None,
|
||||
) -> None:
|
||||
import warnings
|
||||
|
||||
warnings.warn(
|
||||
"RFC7523OAuthClientProvider is deprecated. Use ClientCredentialsOAuthProvider "
|
||||
"or PrivateKeyJWTOAuthProvider instead.",
|
||||
|
|
|
|||
Loading…
Reference in a new issue