Skip to content

Commit a26ab32

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 19d36f9 commit a26ab32

File tree

3 files changed

+19
-15
lines changed

3 files changed

+19
-15
lines changed

jupyter_ydoc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
import sys
55

66
from ._version import __version__ as __version__
7-
from .ystdin import add_stdin as add_stdin
87
from .yblob import YBlob as YBlob
98
from .yfile import YFile as YFile
109
from .ynotebook import YNotebook as YNotebook
10+
from .ystdin import add_stdin as add_stdin
1111
from .yunicode import YUnicode as YUnicode
1212

1313
# See compatibility note on `group` keyword in

jupyter_ydoc/ystdin.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ def add_stdin(cell: Map, prompt: str = "", password: bool = False) -> None:
1818
"input": Text
1919
}
2020
"""
21-
stdin = Map({
22-
"output_type": "stdin",
23-
"state": {
24-
"pending": True,
25-
"password": password,
26-
},
27-
"prompt": prompt,
28-
"input": Text(),
29-
})
21+
stdin = Map(
22+
{
23+
"output_type": "stdin",
24+
"state": {
25+
"pending": True,
26+
"password": password,
27+
},
28+
"prompt": prompt,
29+
"input": Text(),
30+
}
31+
)
3032
outputs = cell.get("outputs")
3133
outputs.append(stdin)

tests/test_ydocs.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ def callback(topic, event):
2626

2727
def test_stdin():
2828
ynotebook = YNotebook()
29-
ynotebook.append_cell({
30-
"cell_type": "code",
31-
"source": "",
32-
})
29+
ynotebook.append_cell(
30+
{
31+
"cell_type": "code",
32+
"source": "",
33+
}
34+
)
3335
ycell = ynotebook.ycells[0]
3436
add_stdin(ycell)
3537
cell = ycell.to_py()
@@ -44,7 +46,7 @@ def test_stdin():
4446
"state": {
4547
"password": False,
4648
"pending": True,
47-
}
49+
},
4850
}
4951
],
5052
"source": "",

0 commit comments

Comments
 (0)