Skip to content

Commit

Permalink
Add some type annotations (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaddyGuthridge authored Aug 1, 2024
1 parent 54fe1d3 commit 6f220ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion testbook/testbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _prepare(self):
elif self.execute not in [None, False]:
self.client.execute_cell(self.execute)

def __enter__(self):
def __enter__(self) -> TestbookNotebookClient:
with self.client.setup_kernel(cleanup_kc=False):
self._prepare()
return self.client
Expand Down
2 changes: 1 addition & 1 deletion testbook/testbooknode.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def __init__(self, *args, **kw):
super().__init__(*args, **kw)

@property
def output_text(self):
def output_text(self) -> str:
text = ''
for output in self['outputs']:
if 'text' in output:
Expand Down

0 comments on commit 6f220ed

Please sign in to comment.