diff --git a/pkgs/development/python-modules/textual-textarea/default.nix b/pkgs/development/python-modules/textual-textarea/default.nix index c2edc1e9fbd5..89638f9586b6 100644 --- a/pkgs/development/python-modules/textual-textarea/default.nix +++ b/pkgs/development/python-modules/textual-textarea/default.nix @@ -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"; diff --git a/pkgs/development/python-modules/textual-textarea/textual-2.0.0.diff b/pkgs/development/python-modules/textual-textarea/textual-2.0.0.diff deleted file mode 100644 index 205ce76033cb..000000000000 --- a/pkgs/development/python-modules/textual-textarea/textual-2.0.0.diff +++ /dev/null @@ -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