Skip to content

Commit 8972a1c

Browse files
iFrostizzFrançois Guyotrv-auditorehildenbrv-jenkins
authored
Bump textual to latest (runtimeverification/pyk#480)
Anticipating for runtimeverification/pyk#460 This will allow us to use `VerticalScroll` widgets to scroll programatically. --------- Co-authored-by: François Guyot <[email protected]> Co-authored-by: devops <[email protected]> Co-authored-by: Everett Hildenbrandt <[email protected]> Co-authored-by: rv-jenkins <[email protected]> Co-authored-by: Sam Balco <[email protected]>
1 parent cf89976 commit 8972a1c

File tree

5 files changed

+101
-36
lines changed

5 files changed

+101
-36
lines changed

pyk/flake.nix

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,32 @@
1919
# We remove `"dev"` from `checkGroups`, so that poetry2nix does not try to resolve dev dependencies.
2020
checkGroups = [ ];
2121
overrides = prev.poetry2nix.overrides.withDefaults
22-
(finalPython: prevPython: {
23-
nanoid = prevPython.nanoid.overridePythonAttrs
24-
(oldAttrs: {
22+
(finalPython: prevPython:
23+
let
24+
markdown-it-py-wo-mdit-py-plugins =
25+
prevPython.markdown-it-py.overridePythonAttrs (oldAttrs: {
26+
propagatedBuildInputs =
27+
builtins.filter (p: p.pname != "mdit-py-plugins")
28+
oldAttrs.propagatedBuildInputs;
29+
buildInputs = (oldAttrs.buildInputs or [ ])
30+
++ [ finalPython.flit-core ];
31+
});
32+
in {
33+
nanoid = prevPython.nanoid.overridePythonAttrs (oldAttrs: {
2534
buildInputs = (oldAttrs.buildInputs or [ ])
2635
++ [ prevPython.setuptools ];
2736
});
28-
});
37+
38+
mdit-py-plugins =
39+
prevPython.mdit-py-plugins.overridePythonAttrs
40+
(oldAttrs: {
41+
propagatedBuildInputs =
42+
builtins.filter (p: p.pname != "markdown-it-py")
43+
oldAttrs.propagatedBuildInputs;
44+
buildInputs = (oldAttrs.buildInputs or [ ])
45+
++ [ markdown-it-py-wo-mdit-py-plugins ];
46+
});
47+
});
2948
};
3049
in rec {
3150
pyk = pyk-python310;

pyk/package/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.335
1+
0.1.336

pyk/poetry.lock

Lines changed: 67 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyk/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "pyk"
7-
version = "0.1.335"
7+
version = "0.1.336"
88
description = ""
99
authors = [
1010
"Runtime Verification, Inc. <[email protected]>",
@@ -18,7 +18,7 @@ filelock = "^3.9.0"
1818
graphviz = "^0.20.1"
1919
psutil = "^5.9.4"
2020
pybind11 = "^2.10.3"
21-
textual = "^0.10.1"
21+
textual = "^0.27.0"
2222
tomli = "^2.0.1"
2323

2424
[tool.poetry.group.dev.dependencies]

pyk/src/pyk/kcfg/tui.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
from textual.app import ComposeResult
2222
from textual.events import Click
23-
from textual.message import MessageTarget
2423

2524
from ..kast import KInner
2625
from ..ktool.kprint import KPrint
@@ -35,9 +34,9 @@ class GraphChunk(Static):
3534
class Selected(Message):
3635
chunk_id: str
3736

38-
def __init__(self, sender: MessageTarget, chunk_id: str) -> None:
37+
def __init__(self, chunk_id: str) -> None:
3938
self.chunk_id = chunk_id
40-
super().__init__(sender)
39+
super().__init__()
4140

4241
def __init__(self, id: str, node_text: Iterable[str] = ()) -> None:
4342
self._node_text = '\n'.join(node_text)
@@ -49,8 +48,8 @@ def on_enter(self) -> None:
4948
def on_leave(self) -> None:
5049
self.styles.border_left = None # type: ignore
5150

52-
async def on_click(self, click: Click) -> None:
53-
await self.emit(GraphChunk.Selected(self, self.id or ''))
51+
def on_click(self, click: Click) -> None:
52+
self.post_message(GraphChunk.Selected(self.id or ''))
5453
click.stop()
5554

5655

@@ -59,7 +58,7 @@ class BehaviorView(Widget):
5958
_kprint: KPrint
6059
_minimize: bool
6160
_node_printer: Callable[[CTerm], Iterable[str]] | None
62-
_nodes: Iterable[GraphChunk]
61+
_kcfg_nodes: Iterable[GraphChunk]
6362

6463
def __init__(
6564
self,
@@ -74,13 +73,13 @@ def __init__(
7473
self._kprint = kprint
7574
self._minimize = minimize
7675
self._node_printer = node_printer
77-
self._nodes = []
76+
self._kcfg_nodes = []
7877
kcfg_show = KCFGShow(kprint)
7978
for lseg_id, node_lines in kcfg_show.pretty_segments(self._kcfg, minimize=self._minimize):
80-
self._nodes.append(GraphChunk(lseg_id, node_lines))
79+
self._kcfg_nodes.append(GraphChunk(lseg_id, node_lines))
8180

8281
def compose(self) -> ComposeResult:
83-
return self._nodes
82+
return self._kcfg_nodes
8483

8584

8685
class NodeView(Widget):

0 commit comments

Comments
 (0)