gallery.accords-library.com/server/szurubooru/search/query.py

18 lines
592 B
Python
Raw Normal View History

from szurubooru.search import tokens
2017-04-24 21:30:53 +00:00
from typing import List
class SearchQuery:
def __init__(self) -> None:
self.anonymous_tokens = [] # type: List[tokens.AnonymousToken]
self.named_tokens = [] # type: List[tokens.NamedToken]
self.special_tokens = [] # type: List[tokens.SpecialToken]
self.sort_tokens = [] # type: List[tokens.SortToken]
def __hash__(self) -> int:
return hash((
tuple(self.anonymous_tokens),
tuple(self.named_tokens),
tuple(self.special_tokens),
tuple(self.sort_tokens)))