Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 31, 2025
1 parent 25cb239 commit 50df2f4
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion plugins/webdav/tests/test_webdav.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
from pathlib import Path
from uuid import uuid4

from fastaio import get_root_component, merge_config
import easywebdav # type: ignore
import pytest
from anyio import to_thread
from fastaio import get_root_component, merge_config

CONFIG = {
"jupyverse": {
Expand Down
7 changes: 3 additions & 4 deletions plugins/yjs/fps_yjs/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from typing import Dict
from uuid import uuid4

from anyio import TASK_STATUS_IGNORED, Event, create_task_group, sleep
from anyio.abc import TaskGroup, TaskStatus
from anyio import TASK_STATUS_IGNORED, create_task_group, sleep
from anyio.abc import TaskStatus
from anyioutils import Task, create_task
from fastapi import (
HTTPException,
Expand All @@ -16,7 +16,7 @@
WebSocketDisconnect,
status,
)
from pycrdt import Doc
from pycrdt import Doc, YMessageType, YSyncMessageType
from websockets.exceptions import ConnectionClosedOK

from jupyverse_api import ResourceLock
Expand All @@ -31,7 +31,6 @@
from .ydocs.ybasedoc import YBaseDoc
from .ywebsocket.websocket_server import WebsocketServer, YRoom
from .ywebsocket.ystore import SQLiteYStore, YDocNotFound
from pycrdt import YMessageType, YSyncMessageType
from .ywidgets import Widgets

YFILE = YDOCS["file"]
Expand Down
3 changes: 1 addition & 2 deletions plugins/yjs/fps_yjs/ywebsocket/django_channels_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
from typing import TypedDict

from channels.generic.websocket import AsyncWebsocketConsumer # type: ignore
from pycrdt import Doc
from pycrdt import Doc, YMessageType, YSyncMessageType, process_sync_message

from .websocket import Websocket
from pycrdt import YMessageType, YSyncMessageType, process_sync_message, create_sync_message

logger = getLogger(__name__)

Expand Down
9 changes: 8 additions & 1 deletion plugins/yjs/fps_yjs/ywebsocket/yroom.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@
)
from anyio.abc import TaskGroup, TaskStatus
from anyio.streams.memory import MemoryObjectReceiveStream, MemoryObjectSendStream
from pycrdt import YMessageType, YSyncMessageType, Doc, create_update_message, create_sync_message, handle_sync_message
from pycrdt import (
Doc,
YMessageType,
YSyncMessageType,
create_sync_message,
create_update_message,
handle_sync_message,
)

from .awareness import Awareness
from .websocket import Websocket
Expand Down
3 changes: 1 addition & 2 deletions plugins/yjs/fps_yjs/ywebsocket/yutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
from pathlib import Path

import anyio
from anyio import BrokenResourceError
from anyio.streams.memory import MemoryObjectSendStream
from pycrdt import Doc, TransactionEvent
from pycrdt import TransactionEvent


def put_updates(update_send_stream: MemoryObjectSendStream, event: TransactionEvent) -> None:
Expand Down
3 changes: 1 addition & 2 deletions tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
import requests
from fps_yjs.ydocs import ydocs
from fps_yjs.ywebsocket import WebsocketProvider
from pycrdt import Array, Doc, Map, Text
from httpx_ws import aconnect_ws

from pycrdt import Array, Doc, Map, Text
from utils import Websocket

prev_theme = {}
Expand Down

0 comments on commit 50df2f4

Please sign in to comment.