Skip to content

Commit 4aab90f

Browse files
committed
Add auto-import statement for IPython
1 parent a862f35 commit 4aab90f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

binder/ipython_config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434

3535
## lines of code to run at IPython startup.
3636
# Default: []
37-
# c.InteractiveShellApp.exec_lines = []
37+
c.InteractiveShellApp.exec_lines = [
38+
"from typing import Any, Callable, Dict, List, Optional, Tuple, Union"
39+
]
3840

3941
## A list of dotted module names of IPython extensions to load.
4042
# Default: []

docker/ipython_config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33

44
# Automatically load testsuite extension
55
c.InteractiveShellApp.extensions = ["tutorial.tests.testsuite"]
6+
7+
# Automatically import some modules
8+
c.InteractiveShellApp.exec_lines = [
9+
"from typing import Any, Callable, Dict, List, Optional, Tuple, Union"
10+
]

0 commit comments

Comments
 (0)