chore: sort imports
This commit is contained in:
@@ -5,6 +5,7 @@ from contextlib import AsyncExitStack, asynccontextmanager
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
import httpx
|
||||||
import uvicorn
|
import uvicorn
|
||||||
from mcp.server.auth.settings import AuthSettings
|
from mcp.server.auth.settings import AuthSettings
|
||||||
from mcp.server.fastmcp import Context, FastMCP
|
from mcp.server.fastmcp import Context, FastMCP
|
||||||
@@ -14,7 +15,7 @@ from starlette.routing import Mount
|
|||||||
|
|
||||||
from nextcloud_mcp_server.auth import NextcloudTokenVerifier, load_or_register_client
|
from nextcloud_mcp_server.auth import NextcloudTokenVerifier, load_or_register_client
|
||||||
from nextcloud_mcp_server.client import NextcloudClient
|
from nextcloud_mcp_server.client import NextcloudClient
|
||||||
from nextcloud_mcp_server.config import setup_logging, LOGGING_CONFIG
|
from nextcloud_mcp_server.config import LOGGING_CONFIG, setup_logging
|
||||||
from nextcloud_mcp_server.context import get_client as get_nextcloud_client
|
from nextcloud_mcp_server.context import get_client as get_nextcloud_client
|
||||||
from nextcloud_mcp_server.server import (
|
from nextcloud_mcp_server.server import (
|
||||||
configure_calendar_tools,
|
configure_calendar_tools,
|
||||||
@@ -176,8 +177,6 @@ async def app_lifespan_oauth(server: FastMCP) -> AsyncIterator[OAuthAppContext]:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
# Fetch OIDC discovery
|
# Fetch OIDC discovery
|
||||||
import httpx
|
|
||||||
|
|
||||||
async with httpx.AsyncClient() as client:
|
async with httpx.AsyncClient() as client:
|
||||||
response = await client.get(discovery_url)
|
response = await client.get(discovery_url)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
@@ -266,8 +265,6 @@ async def setup_oauth_config():
|
|||||||
logger.info(f"Performing OIDC discovery: {discovery_url}")
|
logger.info(f"Performing OIDC discovery: {discovery_url}")
|
||||||
|
|
||||||
# Fetch OIDC discovery
|
# Fetch OIDC discovery
|
||||||
import httpx
|
|
||||||
|
|
||||||
async with httpx.AsyncClient() as client:
|
async with httpx.AsyncClient() as client:
|
||||||
response = await client.get(discovery_url)
|
response = await client.get(discovery_url)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ from .groups import GroupsClient
|
|||||||
from .notes import NotesClient
|
from .notes import NotesClient
|
||||||
from .sharing import SharingClient
|
from .sharing import SharingClient
|
||||||
from .tables import TablesClient
|
from .tables import TablesClient
|
||||||
from .webdav import WebDAVClient
|
|
||||||
from .users import UsersClient
|
from .users import UsersClient
|
||||||
|
from .webdav import WebDAVClient
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,8 @@ import xml.etree.ElementTree as ET
|
|||||||
from typing import Any, Dict, List, Optional, Tuple
|
from typing import Any, Dict, List, Optional, Tuple
|
||||||
|
|
||||||
from httpx import HTTPStatusError
|
from httpx import HTTPStatusError
|
||||||
from icalendar import Alarm, Calendar
|
from icalendar import Alarm, Calendar, vRecur
|
||||||
from icalendar import Event as ICalEvent
|
from icalendar import Event as ICalEvent
|
||||||
from icalendar import vRecur
|
|
||||||
|
|
||||||
from .base import BaseNextcloudClient
|
from .base import BaseNextcloudClient
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from typing import List, Optional, Dict
|
from typing import Dict, List, Optional
|
||||||
|
|
||||||
from nextcloud_mcp_server.client.base import BaseNextcloudClient
|
from nextcloud_mcp_server.client.base import BaseNextcloudClient
|
||||||
from nextcloud_mcp_server.models.users import UserDetails
|
from nextcloud_mcp_server.models.users import UserDetails
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from typing import Any, Dict, List, Optional, Union
|
from typing import Any, Dict, List, Optional, Union
|
||||||
|
|
||||||
from pydantic import BaseModel, ConfigDict, Field
|
from pydantic import BaseModel, ConfigDict, Field
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from nextcloud_mcp_server.context import get_client
|
|
||||||
from mcp.server.fastmcp import Context, FastMCP
|
from mcp.server.fastmcp import Context, FastMCP
|
||||||
|
|
||||||
|
from nextcloud_mcp_server.context import get_client
|
||||||
|
|
||||||
|
|
||||||
def configure_sharing_tools(mcp: FastMCP):
|
def configure_sharing_tools(mcp: FastMCP):
|
||||||
"""Configure sharing-related MCP tools.
|
"""Configure sharing-related MCP tools.
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ version_provider = "uv"
|
|||||||
update_changelog_on_bump = true
|
update_changelog_on_bump = true
|
||||||
major_version_zero = true
|
major_version_zero = true
|
||||||
|
|
||||||
|
[tool.ruff.lint]
|
||||||
|
extend-select = ["I"]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import time
|
|||||||
import uuid
|
import uuid
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from typing import Any, Callable, Awaitable
|
from typing import Any, Awaitable, Callable
|
||||||
|
|
||||||
from tests.load.oauth_pool import UserSessionWrapper
|
from tests.load.oauth_pool import UserSessionWrapper
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from nextcloud_mcp_server.client import NextcloudClient
|
from nextcloud_mcp_server.client import NextcloudClient
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user