Unverified Commit 8adda98a authored by Rick van Schijndel's avatar Rick van Schijndel Committed by GitHub
Browse files

toolong: 1.4.0 -> 1.5.0 (#388011)

parents 8c9c0ded c2d578b4
Loading
Loading
Loading
Loading
+41 −0
Original line number Diff line number Diff line
diff --git a/src/toolong/log_view.py b/src/toolong/log_view.py
index e8ec302..f9b58b5 100644
--- a/src/toolong/log_view.py
+++ b/src/toolong/log_view.py
@@ -30,7 +30,6 @@
 from toolong.watcher import WatcherBase
 from toolong.log_lines import LogLines
 
-
 SPLIT_REGEX = r"[\s/\[\]]"
 
 MAX_DETAIL_LINE_LENGTH = 100_000
@@ -201,10 +200,10 @@ async def mount_keys(self) -> None:
             with self.app.batch_update():
                 key_container = self.query_one(".key-container")
                 await key_container.query("*").remove()
-                bindings = [
-                    binding
-                    for (_, binding) in self.app.namespace_bindings.values()
-                    if binding.show
+                bindings: list[Binding] = [
+                    binding.binding
+                    for binding in self.app.active_bindings.values()
+                    if binding.binding.show
                 ]
 
                 await key_container.mount_all(

diff --git a/src/toolong/log_view.py b/src/toolong/log_view.py
index f9b58b5..e603805 100644
--- a/src/toolong/log_view.py
+++ b/src/toolong/log_view.py
@@ -118,7 +118,7 @@ def render(self) -> str:
         return f"[reverse]{self.key_display}[/reverse] {self.description}"
 
     async def on_click(self) -> None:
-        await self.app.check_bindings(self.key)
+        self.app.simulate_key(self.key)
 
 
 class MetaLabel(Label):
+6 −3
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
  toolong,
}:

python311Packages.buildPythonApplication rec {
python311Packages.buildPythonApplication {
  pname = "toolong";
  version = "1.4.0";
  pyproject = true;
@@ -14,8 +14,8 @@ python311Packages.buildPythonApplication rec {
  src = fetchFromGitHub {
    owner = "Textualize";
    repo = "toolong";
    tag = "v${version}";
    hash = "sha256-Zd6j1BIrsLJqptg7BXb67qY3DaeHRHieWJoYYCDHaoc=";
    rev = "5aa22ee878026f46d4d265905c4e1df4d37842ae"; # no tag
    hash = "sha256-HrmU7HxWKYrbV25Y5CHLw7/7tX8Y5mTsTL1aXGGTSIo=";
  };

  build-system = [ python311Packages.poetry-core ];
@@ -30,6 +30,9 @@ python311Packages.buildPythonApplication rec {
  pythonImportsCheck = [ "toolong" ];
  doCheck = false; # no tests

  # From https://github.com/Textualize/toolong/pull/63, also fixes https://github.com/NixOS/nixpkgs/issues/360671
  patches = [ ./0001-log-view.patch ];

  passthru.tests.version = testers.testVersion {
    package = toolong;
    command = "${lib.getExe toolong} --version";