Skip to content

Commit

Permalink
more typing cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed May 5, 2022
1 parent abd2afb commit 914a384
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions nbclient/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ def test_mock_wrapper(self):
cell_mock = NotebookNode(
source='"foo" = "bar"', metadata={}, cell_type='code', outputs=[]
)
executor = NotebookClient({}) # type:ignore
executor.nb = {'cells': [cell_mock]} # type:ignore
executor = NotebookClient({})
executor.nb = {'cells': [cell_mock]}

# self.kc.iopub_channel.get_msg => message_mock.side_effect[i]
message_mock = iopub_messages_mock()
Expand Down Expand Up @@ -503,7 +503,7 @@ class TestExecute(NBClientTestsBase):
maxDiff = None

def test_constructor(self):
NotebookClient({}) # type:ignore
NotebookClient({})

def test_populate_language_info(self):
nb = nbformat.v4.new_notebook() # Certainly has no language_info.
Expand Down
2 changes: 1 addition & 1 deletion nbclient/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def just_run(coro: Awaitable) -> Any:

T = TypeVar("T")

def run_sync(coro: Callable[..., T]) -> Callable[..., T]:
def run_sync(coro: Callable[..., Awaitable[T]]) -> Callable[..., T]:
"""Runs a coroutine and blocks until it has executed.
An event loop is created if no one already exists. If an event loop is
Expand Down

0 comments on commit 914a384

Please sign in to comment.