Skip to content

Commit 58c0df1

Browse files
methanetheskumar
authored andcommitted
Import IPython lazily (theskumar#84)
1 parent 6adc19e commit 58c0df1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

dotenv/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
from .cli import get_cli_string
22
from .main import load_dotenv, get_key, set_key, unset_key, find_dotenv
3-
try:
4-
from .ipython import load_ipython_extension
5-
except ImportError:
6-
pass
3+
74

85
__all__ = ['get_cli_string', 'load_dotenv', 'get_key', 'set_key', 'unset_key', 'find_dotenv', 'load_ipython_extension']
6+
7+
8+
def load_ipython_extension(ipython):
9+
from .ipython import load_ipython_extension
10+
load_ipython_extension(ipython)

0 commit comments

Comments
 (0)