Show More
@@ -47,16 +47,29 b' except ModuleNotFoundError:' | |||||
47 | def __init__(self, path): |
|
47 | def __init__(self, path): | |
48 | pass |
|
48 | pass | |
49 |
|
49 | |||
50 | def get(self, key, default): |
|
50 | def get(self, key, default=None): | |
51 | warn( |
|
51 | warn( | |
52 | f"using {key} requires you to install the `pickleshare` library.", |
|
52 | f"This is now an optional IPython functionality, using {key} requires you to install the `pickleshare` library.", | |
53 | stacklevel=2, |
|
53 | stacklevel=2, | |
54 | ) |
|
54 | ) | |
55 | return default |
|
55 | return default | |
56 |
|
56 | |||
|
57 | def __getitem__(self, key): | |||
|
58 | warn( | |||
|
59 | f"This is now an optional IPython functionality, using {key} requires you to install the `pickleshare` library.", | |||
|
60 | stacklevel=2, | |||
|
61 | ) | |||
|
62 | return None | |||
|
63 | ||||
57 | def __setitem__(self, key, value): |
|
64 | def __setitem__(self, key, value): | |
58 | warn( |
|
65 | warn( | |
59 | f"using {key} requires you to install the `pickleshare` library.", |
|
66 | f"This is now an optional IPython functionality, setting {key} requires you to install the `pickleshare` library.", | |
|
67 | stacklevel=2, | |||
|
68 | ) | |||
|
69 | ||||
|
70 | def __delitem__(self, key): | |||
|
71 | warn( | |||
|
72 | f"This is now an optional IPython functionality, deleting {key} requires you to install the `pickleshare` library.", | |||
60 | stacklevel=2, |
|
73 | stacklevel=2, | |
61 | ) |
|
74 | ) | |
62 |
|
75 |
@@ -145,7 +145,7 b' class StoreMagics(Magics):' | |||||
145 | if args: |
|
145 | if args: | |
146 | for arg in args: |
|
146 | for arg in args: | |
147 | try: |
|
147 | try: | |
148 |
obj = db[ |
|
148 | obj = db["autorestore/" + arg] | |
149 | except KeyError: |
|
149 | except KeyError: | |
150 | try: |
|
150 | try: | |
151 | restore_aliases(ip, alias=arg) |
|
151 | restore_aliases(ip, alias=arg) |
General Comments 0
You need to be logged in to leave comments.
Login now