Skip to content

Commit 8940e49

Browse files
author
Danil Tolmachev
committed
rename Searcher -> KeySearcher
1 parent 5d5a103 commit 8940e49

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dictdatabase/io_unsafe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from . import io_bytes
1414
from . import utils
1515
from .index_manager import IndexManager
16-
from .searching import Searcher
16+
from .searching import KeySearcher
1717

1818

1919
@dataclass(frozen=True) # slots=True not supported by python 3.8 and 3.9
@@ -88,7 +88,7 @@ def partial_read_only(db_name: str, key: str) -> dict | None:
8888

8989
# Not found in index file, search for key in the entire file
9090
all_file_bytes = io_bytes.read(db_name)
91-
start, end, found = Searcher().search(all_file_bytes, key)
91+
start, end, found = KeySearcher().search(all_file_bytes, key)
9292
if not found:
9393
return None
9494
value_bytes = all_file_bytes[start:end]

dictdatabase/searching.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from dictdatabase import utils
55

66

7-
class Searcher:
7+
class KeySearcher:
88
@staticmethod
99
def find_start_end_in_bytes(file: bytes, key: str) -> Tuple[int, int, bool]:
1010
"""

0 commit comments

Comments
 (0)