refactor(chalice): optimized autocomplete lazy initialization
This commit is contained in:
parent
59d3253737
commit
264f28ed39
2 changed files with 4 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from functools import lru_cache
|
||||
from functools import cache
|
||||
from typing import Optional
|
||||
|
||||
import schemas
|
||||
|
|
@ -138,7 +138,7 @@ class EventType:
|
|||
column=None) # column=None because errors are searched by name or message
|
||||
|
||||
|
||||
@lru_cache
|
||||
@cache
|
||||
def supported_types():
|
||||
return {
|
||||
EventType.CLICK.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.CLICK),
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
from functools import lru_cache
|
||||
from functools import cache
|
||||
|
||||
import schemas
|
||||
from chalicelib.core.autocomplete import autocomplete
|
||||
from chalicelib.utils.event_filter_definition import SupportedFilter
|
||||
|
||||
|
||||
@lru_cache
|
||||
@cache
|
||||
def supported_types():
|
||||
return {
|
||||
schemas.FilterType.USER_OS: SupportedFilter(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue