Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

Commit 68a7c0e

Browse files
committed
Use safer key lookup and provide default value
1 parent c399b56 commit 68a7c0e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

flox/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from .launcher import Launcher
1717
from .browser import Browser
1818
from .settings import Settings
19+
from .string_matcher import DEFAULT_QUERY_SEARCH_PRECISION
1920

2021
PLUGIN_MANIFEST = 'plugin.json'
2122
FLOW_LAUNCHER_DIR_NAME = "FlowLauncher"
@@ -241,7 +242,7 @@ def app_settings(self):
241242

242243
@property
243244
def query_search_precision(self):
244-
return self.app_settings['QuerySearchPrecision']
245+
return self.app_settings.get('QuerySearchPrecision', DEFAULT_QUERY_SEARCH_PRECISION)
245246

246247
@cached_property
247248
def user_keywords(self):

0 commit comments

Comments
 (0)