Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Aug 17, 2023
1 parent a361cb8 commit 5f4e590
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scan_to_paperless/jupyter.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ def create_transform_notebook(
nbformat.v4.new_code_cell( # type: ignore[no-untyped-call]
"""import IPython
base_folder = os.path.dirname(os.path.dirname(IPython.extract_module_locals()[1].get('__vsc_ipynb_file__', os.getcwd())))"""
jupyter_locals = IPython.extract_module_locals()[1]
base_folder = os.path.dirname(os.path.dirname(jupyter_locals['__vsc_ipynb_file__']) if '' in jupyter_locals else os.getcwd()))"""
)
)

Expand Down

0 comments on commit 5f4e590

Please sign in to comment.