File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737from typing import Optional , Sequence , Tuple
3838from warnings import warn
3939
40- from pickleshare import PickleShareDB
40+ try :
41+ from pickleshare import PickleShareDB
42+ except ModuleNotFoundError :
43+
44+ class PickleShareDB : # type: ignore [no-redef]
45+ def __init__ (self , path ):
46+ pass
47+
48+ def get (self , key , default ):
49+ warn (
50+ f"using { key } requires you to install the `pickleshare` library." ,
51+ stacklevel = 2 ,
52+ )
53+ return default
54+
55+ def __setitem__ (self , key , value ):
56+ warn (
57+ f"using { key } requires you to install the `pickleshare` library." ,
58+ stacklevel = 2 ,
59+ )
60+
61+
4162from tempfile import TemporaryDirectory
4263from traitlets import (
4364 Any ,
Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ install_requires =
3636 jedi>=0.16
3737 matplotlib-inline
3838 pexpect>4.3; sys_platform != "win32"
39- pickleshare
4039 prompt_toolkit>=3.0.30,<3.1.0,!=3.0.37
4140 pygments>=2.4.0
4241 stack_data
7675 pytest<7.1
7776 pytest-asyncio
7877 testpath
78+ pickleshare
7979test_extra =
8080 %(test)s
8181 curio
You can’t perform that action at this time.
0 commit comments