summaryrefslogtreecommitdiffstats
path: root/src/prompt_toolkit/layout/processors.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 04:45:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 04:45:15 +0000
commit6dc655898df34ad424dfc467a8b276fdf31bd791 (patch)
tree0a3f3addbfc0b81e3850a628afe62ce830a8b0f3 /src/prompt_toolkit/layout/processors.py
parentReleasing progress-linux version 3.0.43-2~progress7.99u1. (diff)
downloadprompt-toolkit-6dc655898df34ad424dfc467a8b276fdf31bd791.tar.xz
prompt-toolkit-6dc655898df34ad424dfc467a8b276fdf31bd791.zip
Merging upstream version 3.0.46.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/prompt_toolkit/layout/processors.py')
-rw-r--r--src/prompt_toolkit/layout/processors.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/prompt_toolkit/layout/processors.py b/src/prompt_toolkit/layout/processors.py
index b737611..b10ecf7 100644
--- a/src/prompt_toolkit/layout/processors.py
+++ b/src/prompt_toolkit/layout/processors.py
@@ -5,6 +5,7 @@ from a buffer before the BufferControl will render it to the screen.
They can insert fragments before or after, or highlight fragments by replacing the
fragment types.
"""
+
from __future__ import annotations
import re
@@ -343,9 +344,9 @@ class HighlightMatchingBracketProcessor(Processor):
self.chars = chars
self.max_cursor_distance = max_cursor_distance
- self._positions_cache: SimpleCache[
- Hashable, list[tuple[int, int]]
- ] = SimpleCache(maxsize=8)
+ self._positions_cache: SimpleCache[Hashable, list[tuple[int, int]]] = (
+ SimpleCache(maxsize=8)
+ )
def _get_positions_to_highlight(self, document: Document) -> list[tuple[int, int]]:
"""
@@ -924,11 +925,7 @@ class ConditionalProcessor(Processor):
return Transformation(transformation_input.fragments)
def __repr__(self) -> str:
- return "{}(processor={!r}, filter={!r})".format(
- self.__class__.__name__,
- self.processor,
- self.filter,
- )
+ return f"{self.__class__.__name__}(processor={self.processor!r}, filter={self.filter!r})"
class DynamicProcessor(Processor):