Skip to content

Commit 3c490cd

Browse files
committed
bump Rich
1 parent c41bced commit 3c490cd

File tree

3 files changed

+17
-21
lines changed

3 files changed

+17
-21
lines changed

poetry.lock

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

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ license = "MIT"
77

88
[tool.poetry.dependencies]
99
python = "^3.7"
10-
rich = "^10.2.2"
10+
rich = "^10.3.0"
1111

1212
[tool.poetry.dev-dependencies]
13-
rich = {git = "[email protected]:willmcgugan/rich", rev = "tui"}
13+
#rich = {git = "[email protected]:willmcgugan/rich", rev = "tui"}
1414

1515
[build-system]
1616
requires = ["poetry-core>=1.0.0"]

src/textual/view.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
from rich.console import Console, ConsoleOptions, RenderResult
99
from rich.layout import Layout
10-
from rich.region import Region
10+
from rich.region import Region as LayoutRegion
1111
from rich.repr import rich_repr, RichReprResult
1212
from rich.segment import Segments
1313

1414
from . import events
1515
from ._context import active_app
16-
from .geometry import Dimensions
16+
from .geometry import Dimensions, Region
1717
from .message import Message
1818
from .message_pump import MessagePump
1919
from .widget import Widget, UpdateMessage
@@ -101,9 +101,9 @@ def __rich_console__(
101101
segments = console.render(self.layout, options)
102102
yield from segments
103103

104-
def get_widget_at(self, x: int, y: int) -> Tuple[Widget, Region]:
104+
def get_widget_at(self, x: int, y: int) -> Tuple[Widget, LayoutRegion]:
105105
for layout, (region, render) in self.layout.map.items():
106-
if region.contains(x, y):
106+
if Region(*region).contains(x, y):
107107
if isinstance(layout.renderable, Widget):
108108
return layout.renderable, region
109109
else:

0 commit comments

Comments
 (0)