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 May 3, 2024
1 parent 44b8f55 commit d525b5e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pycrdt_websocket/yroom.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class YRoom:
_stopped: Event
__start_lock: Lock | None
_subscription: Subscription | None

def __init__(
self,
ready: bool = True,
Expand Down Expand Up @@ -86,7 +86,7 @@ def __init__(
self._started = None
self.__start_lock = None
self._subscription = None

@property
def _start_lock(self) -> Lock:
if self.__start_lock is None:
Expand Down
2 changes: 1 addition & 1 deletion pycrdt_websocket/ystore.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,4 +485,4 @@ async def write(self, data: bytes) -> None:
"INSERT INTO yupdates VALUES (?, ?, ?, ?)",
(self.path, data, metadata, time.time()),
)
await self._db.commit()
await self._db.commit()
7 changes: 3 additions & 4 deletions tests/test_ystore.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
from pathlib import Path
from unittest.mock import patch

from pycrdt_websocket.websocket_server import exception_logger
from pycrdt_websocket.yroom import YRoom
import pytest
from pycrdt import Map
from anyio import create_task_group, sleep
from pycrdt import Map
from sqlite_anyio import connect
from utils import StartStopContextManager, YDocTest

from pycrdt_websocket.websocket_server import exception_logger
from pycrdt_websocket.yroom import YRoom
from pycrdt_websocket.ystore import SQLiteYStore, TempFileYStore

pytestmark = pytest.mark.anyio
Expand Down Expand Up @@ -149,4 +149,3 @@ async def test_yroom_stop(yws_server, yws_provider, YStore):
await yroom.stop()
assert yroom._task_group is None
assert ystore._task_group is None

0 comments on commit d525b5e

Please sign in to comment.