Skip to content

Commit

Permalink
fixed pre commit issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Meriem-BenIsmail committed Aug 6, 2024
1 parent c9685da commit 88fa250
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ docs/source/changelog.md
!.yarn/sdks
!.yarn/versions
packages/docprovider/junit.xml
.jupyter_ystore.db
.jupyter_ystore.db
2 changes: 1 addition & 1 deletion packages/docprovider-extension/src/filebrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export const defaultFileBrowser: JupyterFrontEndPlugin<IDefaultFileBrowser> = {
tree,
labShell
);

return defaultBrowser;
}
};
Expand Down
2 changes: 1 addition & 1 deletion packages/docprovider/src/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const TimelineSliderComponent: React.FC<Props> = ({
'restore',
0
);
if (response.code == 200) {
if (response.code === 200) {
Notification.success(response.status, { autoClose: 4000 });
} else {
Notification.error(response.status, { autoClose: 4000 });
Expand Down
2 changes: 1 addition & 1 deletion packages/docprovider/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ export * from './requests';
export * from './ydrive';
export * from './yprovider';
export * from './tokens';
export * from './TimelineSlider'
export * from './TimelineSlider';
2 changes: 1 addition & 1 deletion packages/docprovider/src/yprovider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export class WebSocketProvider implements IDocumentProvider {
showErrorMessage(this._trans.__('Document session error'), event.reason, [
Dialog.okButton()
]);

// Dispose shared model immediately. Better break the document model,
// than overriding data on disk.
this._sharedModel.dispose();
Expand Down
10 changes: 6 additions & 4 deletions packages/docprovider/style/slider.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
#slider-status-bar {
display: flex;
}

.jp-Notebook.frozen {
pointer-events: none;
opacity: 0.5;
}

.timestamp-display {
display: flex;
flex-direction: row;
Expand All @@ -20,10 +22,10 @@

.restore-btn button {
cursor: pointer;
color: #fff;
width: 100%;
color: #fff;
width: 100%;
}

.restore-btn {
width: 192px;
}
width: 192px;
}
18 changes: 6 additions & 12 deletions projects/jupyter-server-ydoc/jupyter_server_ydoc/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@
import uuid
from logging import Logger
from typing import Any
from uuid import uuid4

from jupyter_server.auth import authorized
from jupyter_server.base.handlers import APIHandler, JupyterHandler
from jupyter_server.utils import ensure_async

from jupyter_ydoc import ydocs as YDOCS
from pycrdt import YMessageType, write_var_uint
from jupyter_ydoc.yfile import YFile
from jupyter_ydoc.ynotebook import YNotebook
from jupytercad_core.jcad_ydoc import YJCad
from pycrdt import Doc, UndoManager, YMessageType, write_var_uint
from pycrdt_websocket.websocket_server import YRoom
from pycrdt import Doc, UndoManager
from pycrdt_websocket.yroom import YRoom
from pycrdt_websocket.ystore import BaseYStore
from tornado import web
from tornado.websocket import WebSocketHandler, WebSocketClosedError
from tornado.websocket import WebSocketClosedError, WebSocketHandler

from pycrdt import Doc
from uuid import uuid4
from .loaders import FileLoaderMapping
from .rooms import DocumentRoom, TransientRoom
from .utils import (
Expand All @@ -37,10 +37,6 @@
room_id_from_encoded_path,
)
from .websocketserver import JupyterWebsocketServer, RoomNotFound
from jupyter_ydoc.ynotebook import YNotebook
from jupyter_ydoc.yfile import YFile

from jupytercad_core.jcad_ydoc import YJCad

YFILE = YDOCS["file"]

Expand Down Expand Up @@ -474,7 +470,6 @@ async def put(self, path):


class TimelineHandler(APIHandler):

def initialize(self, ystore_class: type[BaseYStore], ywebsocket_server: JupyterWebsocketServer):
self.ystore_class = ystore_class
self.ywebsocket_server = ywebsocket_server
Expand Down Expand Up @@ -506,7 +501,6 @@ async def get(self, path: str):


class TimelineForkHandler(APIHandler):

def initialize(self, ywebsocket_server: JupyterWebsocketServer) -> None:
self._websocket_server = ywebsocket_server

Expand Down

0 comments on commit 88fa250

Please sign in to comment.