Skip to content

Commit 2e3aa19

Browse files
create public remove cache method
1 parent 62bb10a commit 2e3aa19

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

mumble/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
__version__ = "0.2.0"
2-
__all__ = ["PSMHandler"]
2+
__all__ = ["PSMHandler", "remove_modification_cache"]
33

4-
from mumble.mumble import PSMHandler, _ModificationCache
4+
from mumble.mumble import PSMHandler, remove_modification_cache

mumble/__main__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
from rich.logging import RichHandler
66

7-
from mumble import PSMHandler, _ModificationCache
8-
7+
from mumble import PSMHandler, remove_modification_cache
98

109
# setup logging
1110
logging.basicConfig(
@@ -110,7 +109,7 @@ def main(clear_cache, **kwargs):
110109
"""
111110
# if the user just wants to clear the cache, do it and quit
112111
if clear_cache:
113-
_ModificationCache._remove_cache()
112+
remove_modification_cache()
114113
logging.info("Exiting Mumble. You will find your match another time.")
115114
sys.exit(0)
116115

mumble/mumble.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,10 @@ def _read_unimod_file(self, modification_file=None):
10561056
return None, None
10571057

10581058

1059+
def remove_modification_cache():
1060+
_ModificationCache._remove_cache()
1061+
1062+
10591063
class JSONConfigLoader:
10601064
"""Loads a single-level configuration from a JSON file."""
10611065

0 commit comments

Comments
 (0)