-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "typing(issue_search): Add typing to issue search backends and…
… executors (#29902)" This reverts commit 38307fc. Co-authored-by: dfuller via Slack <dfuller@sentry.io>
- Loading branch information
1 parent
1f74b07
commit 9f9870b
Showing
4 changed files
with
128 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,26 @@ | ||
from __future__ import annotations | ||
|
||
from datetime import datetime | ||
from typing import TYPE_CHECKING, Any, FrozenSet, Mapping, Optional, Sequence | ||
|
||
from sentry.utils.services import Service | ||
|
||
ANY = object() | ||
|
||
if TYPE_CHECKING: | ||
from sentry.api.event_search import SearchFilter | ||
from sentry.models import Environment, Project | ||
from sentry.utils.cursors import Cursor, CursorResult | ||
|
||
|
||
class SearchBackend(Service): # type: ignore | ||
class SearchBackend(Service): | ||
__read_methods__ = frozenset(["query"]) | ||
__write_methods__: FrozenSet[str] = frozenset() | ||
__write_methods__ = frozenset() | ||
__all__ = __read_methods__ | __write_methods__ | ||
|
||
def __init__(self, **options: Optional[Mapping[str, Any]]): | ||
def __init__(self, **options): | ||
pass | ||
|
||
def query( | ||
self, | ||
projects: Sequence[Project], | ||
environments: Optional[Sequence[Environment]] = None, | ||
sort_by: str = "date", | ||
limit: int = 100, | ||
cursor: Optional[Cursor] = None, | ||
count_hits: bool = False, | ||
paginator_options: Optional[Mapping[str, Any]] = None, | ||
search_filters: Optional[Sequence[SearchFilter]] = None, | ||
date_from: Optional[datetime] = None, | ||
date_to: Optional[datetime] = None, | ||
max_hits: Optional[int] = None, | ||
) -> CursorResult: | ||
projects, | ||
tags=None, | ||
environments=None, | ||
sort_by="date", | ||
limit=100, | ||
cursor=None, | ||
count_hits=False, | ||
paginator_options=None, | ||
**parameters, | ||
): | ||
raise NotImplementedError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.