fix [Bug] Screeners - Autocomplete of Stock Screener (#3308)

* fix [Bug] Screeners - Autocomplete of Stock Screener

* Add test so this doesn't happen again

Co-authored-by: James Maslek <jmaslek11@gmail.com>
This commit is contained in:
andrewkenreich
2022-11-04 23:00:19 -04:00
committed by GitHub
parent 20de9a75f1
commit 0a4dcd54b4
2 changed files with 11 additions and 2 deletions

View File

@@ -58,13 +58,13 @@ class ScreenerController(BaseController):
PRESETS_PATH_DEFAULT = Path(__file__).parent / "presets"
preset_choices = {
filepath.name.strip(".ini"): filepath
filepath.name.replace(".ini", ""): filepath
for filepath in PRESETS_PATH.iterdir()
if filepath.suffix == ".ini"
}
preset_choices.update(
{
filepath.name.strip(".ini"): filepath
filepath.name.replace(".ini", ""): filepath
for filepath in PRESETS_PATH_DEFAULT.iterdir()
if filepath.suffix == ".ini"
}

View File

@@ -239,6 +239,15 @@ def test_call_func_expect_queue(expected_queue, func, queue):
[],
dict(),
),
(
"call_set",
[
"short_squeeze_scan.ini",
],
"",
[],
dict(),
),
(
"call_historical",
[