Show More
@@ -37,7 +37,28 b' from typing import List as ListType, Dict as DictType, Any as AnyType' | |||
|
37 | 37 |
|
|
38 | 38 |
|
|
39 | 39 | |
|
40 | try: | |
|
40 | 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 | ||
|
41 | 62 |
|
|
42 | 63 |
|
|
43 | 64 |
|
@@ -36,7 +36,6 b' install_requires =' | |||
|
36 | 36 | jedi>=0.16 |
|
37 | 37 | matplotlib-inline |
|
38 | 38 | pexpect>4.3; sys_platform != "win32" |
|
39 | pickleshare | |
|
40 | 39 | prompt_toolkit>=3.0.30,<3.1.0,!=3.0.37 |
|
41 | 40 | pygments>=2.4.0 |
|
42 | 41 | stack_data |
@@ -76,6 +75,7 b' test =' | |||
|
76 | 75 | pytest<7.1 |
|
77 | 76 | pytest-asyncio |
|
78 | 77 | testpath |
|
78 | pickleshare | |
|
79 | 79 | test_extra = |
|
80 | 80 | %(test)s |
|
81 | 81 | curio |
General Comments 0
You need to be logged in to leave comments.
Login now