python3Packages.textual-textarea: 0.15.0 -> 0.16.0

Diff: https://github.com/tconbeer/textual-textarea/compare/v0.15.0...v0.16.0

Changelog: https://github.com/tconbeer/textual-textarea/releases/tag/v0.16.0
This commit is contained in:
Gaetan Lepage
2025-10-20 21:56:24 +00:00
parent 990146f6a3
commit 1d79640045
2 changed files with 14 additions and 72 deletions
@@ -4,63 +4,53 @@
fetchFromGitHub,
# build-system
poetry-core,
hatchling,
# dependencies
pyperclip,
textual,
# tests
pytestCheckHook,
pytest-asyncio,
tree-sitter,
tree-sitter-python,
tree-sitter-sql,
# tests
pytest-asyncio,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "textual-textarea";
version = "0.15.0";
version = "0.16.0";
pyproject = true;
src = fetchFromGitHub {
owner = "tconbeer";
repo = "textual-textarea";
tag = "v${version}";
hash = "sha256-aaeXgD6RMQ3tlK5H/2lk3ueTyA3yYjHrYL51w/1tvSI=";
hash = "sha256-AIt3UqfZbJBgAACxJHElhvAsJWk9I6zjdeRjBtI/FiA=";
};
patches = [
# https://github.com/tconbeer/textual-textarea/issues/296
./textual-2.0.0.diff
];
build-system = [ hatchling ];
pythonRelaxDeps = [
"textual"
"tree-sitter-sql"
];
build-system = [ poetry-core ];
dependencies = [
pyperclip
textual
tree-sitter
tree-sitter-python
tree-sitter-sql
]
++ textual.optional-dependencies.syntax;
nativeCheckInputs = [
pytestCheckHook
pytest-asyncio
tree-sitter-python
tree-sitter-sql
pytestCheckHook
];
pythonImportsCheck = [ "textual_textarea" ];
disabledTests = [
# AssertionError: assert Selection(sta...), end=(0, 6)) == Selection(sta...), end=(1, 0))
# https://github.com/tconbeer/textual-textarea/issues/296
"test_keys"
];
meta = {
description = "Text area (multi-line input) with syntax highlighting for Textual";
homepage = "https://github.com/tconbeer/textual-textarea";
@@ -1,48 +0,0 @@
diff --git a/src/textual_textarea/autocomplete.py b/src/textual_textarea/autocomplete.py
index 51fa81d..a64f9ab 100644
--- a/src/textual_textarea/autocomplete.py
+++ b/src/textual_textarea/autocomplete.py
@@ -13,7 +13,7 @@ from textual.message import Message
from textual.reactive import Reactive, reactive
from textual.widget import Widget
from textual.widgets import OptionList
-from textual.widgets._option_list import NewOptionListContent
+from textual.widgets._option_list import OptionListContent
from textual.widgets.option_list import Option
from textual_textarea.messages import TextAreaHideCompletionList
@@ -44,6 +44,8 @@ class CompletionList(OptionList, can_focus=False, inherit_bindings=False):
width: 40;
max-height: 8;
display: none;
+ text-wrap: nowrap;
+ text-overflow: ellipsis;
}
CompletionList.open {
display: block;
@@ -71,14 +73,14 @@ class CompletionList(OptionList, can_focus=False, inherit_bindings=False):
def __init__(
self,
- *content: NewOptionListContent,
+ *content: OptionListContent,
name: str | None = None,
id: str | None = None, # noqa: A002
classes: str | None = None,
disabled: bool = False,
):
super().__init__(
- *content, name=name, id=id, classes=classes, disabled=disabled, wrap=False
+ *content, name=name, id=id, classes=classes, disabled=disabled
)
def set_offset(self, x_offset: int, y_offset: int) -> None:
@@ -187,7 +189,7 @@ class CompletionList(OptionList, can_focus=False, inherit_bindings=False):
self.y_offset,
)
- self.add_options(items=items)
+ self.add_options(new_options=items)
self.action_first()
self.additional_x_offset = additional_x_offset
self.is_open = True