@@ -197,28 +197,28 @@ def few_enough_underscores(current: str, match: str) -> bool:
197
197
return not match .startswith ("_" )
198
198
199
199
200
- def method_match_none (word : str , size : int , text : str ) -> bool :
200
+ def _method_match_none (word : str , size : int , text : str ) -> bool :
201
201
return False
202
202
203
203
204
- def method_match_simple (word : str , size : int , text : str ) -> bool :
204
+ def _method_match_simple (word : str , size : int , text : str ) -> bool :
205
205
return word [:size ] == text
206
206
207
207
208
- def method_match_substring (word : str , size : int , text : str ) -> bool :
208
+ def _method_match_substring (word : str , size : int , text : str ) -> bool :
209
209
return text in word
210
210
211
211
212
- def method_match_fuzzy (word : str , size : int , text : str ) -> Optional [Match ]:
212
+ def _method_match_fuzzy (word : str , size : int , text : str ) -> Optional [Match ]:
213
213
s = r".*%s.*" % ".*" .join (list (text ))
214
214
return re .search (s , word )
215
215
216
216
217
- MODES_MAP = {
218
- AutocompleteModes .NONE : method_match_none ,
219
- AutocompleteModes .SIMPLE : method_match_simple ,
220
- AutocompleteModes .SUBSTRING : method_match_substring ,
221
- AutocompleteModes .FUZZY : method_match_fuzzy ,
217
+ _MODES_MAP = {
218
+ AutocompleteModes .NONE : _method_match_none ,
219
+ AutocompleteModes .SIMPLE : _method_match_simple ,
220
+ AutocompleteModes .SUBSTRING : _method_match_substring ,
221
+ AutocompleteModes .FUZZY : _method_match_fuzzy ,
222
222
}
223
223
224
224
@@ -231,7 +231,7 @@ def __init__(
231
231
mode : AutocompleteModes = AutocompleteModes .SIMPLE ,
232
232
) -> None :
233
233
self ._shown_before_tab = shown_before_tab
234
- self .method_match = MODES_MAP [mode ]
234
+ self .method_match = _MODES_MAP [mode ]
235
235
236
236
@abc .abstractmethod
237
237
def matches (
0 commit comments