diff options
author | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
---|---|---|
committer | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
commit | 06e5c21a835c0e923506c4ff27929f34e00761c2 (patch) | |
tree | 75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /contrib/python/prompt-toolkit/py2/prompt_toolkit/search_state.py | |
parent | 03f024c4412e3aa613bb543cf1660176320ba8f4 (diff) | |
download | ydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz |
fix ya.make
Diffstat (limited to 'contrib/python/prompt-toolkit/py2/prompt_toolkit/search_state.py')
-rw-r--r-- | contrib/python/prompt-toolkit/py2/prompt_toolkit/search_state.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/contrib/python/prompt-toolkit/py2/prompt_toolkit/search_state.py b/contrib/python/prompt-toolkit/py2/prompt_toolkit/search_state.py deleted file mode 100644 index 3c494ea1a9..0000000000 --- a/contrib/python/prompt-toolkit/py2/prompt_toolkit/search_state.py +++ /dev/null @@ -1,36 +0,0 @@ -from .enums import IncrementalSearchDirection -from .filters import to_simple_filter - -__all__ = ( - 'SearchState', -) - - -class SearchState(object): - """ - A search 'query'. - """ - __slots__ = ('text', 'direction', 'ignore_case') - - def __init__(self, text='', direction=IncrementalSearchDirection.FORWARD, ignore_case=False): - ignore_case = to_simple_filter(ignore_case) - - self.text = text - self.direction = direction - self.ignore_case = ignore_case - - def __repr__(self): - return '%s(%r, direction=%r, ignore_case=%r)' % ( - self.__class__.__name__, self.text, self.direction, self.ignore_case) - - def __invert__(self): - """ - Create a new SearchState where backwards becomes forwards and the other - way around. - """ - if self.direction == IncrementalSearchDirection.BACKWARD: - direction = IncrementalSearchDirection.FORWARD - else: - direction = IncrementalSearchDirection.BACKWARD - - return SearchState(text=self.text, direction=direction, ignore_case=self.ignore_case) |