mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
doc update
This commit is contained in:
2
poetry.lock
generated
2
poetry.lock
generated
@@ -345,7 +345,7 @@ mkdocs = ">=1.1"
|
||||
|
||||
[[package]]
|
||||
name = "mkdocs-material"
|
||||
version = "8.3.9"
|
||||
version = "8.4.1"
|
||||
description = "Documentation that simply works"
|
||||
category = "dev"
|
||||
optional = false
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
"""
|
||||
Manages Color in Textual.
|
||||
|
||||
All instances where the developer is presented with a color should use this class. The only
|
||||
All instances where the developer is presented with a color will use this class. The only
|
||||
exception should be when passing things to a Rich renderable, which will need to use the
|
||||
`rich_color` attribute to perform a conversion.
|
||||
|
||||
I'm not entirely happy with burdening the user with two similar color classes. In a future
|
||||
update we might add a protocol to convert automatically so the dev could use them interchangeably.
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -357,12 +357,13 @@ class Region(NamedTuple):
|
||||
|
||||
@property
|
||||
def column_span(self) -> tuple[int, int]:
|
||||
"""Get the start and end column (x coord).
|
||||
"""Get the start and end columns (x coord).
|
||||
|
||||
The end value is exclusive.
|
||||
|
||||
Returns:
|
||||
tuple[int, int]: Pair of x coordinates (column numbers).
|
||||
|
||||
"""
|
||||
return (self.x, self.x + self.width)
|
||||
|
||||
@@ -374,6 +375,7 @@ class Region(NamedTuple):
|
||||
|
||||
Returns:
|
||||
tuple[int, int]: Pair of y coordinates (line numbers).
|
||||
|
||||
"""
|
||||
return (self.y, self.y + self.height)
|
||||
|
||||
@@ -402,7 +404,7 @@ class Region(NamedTuple):
|
||||
"""Get the area within the region.
|
||||
|
||||
Returns:
|
||||
int: area.
|
||||
int: Area covered by this region.
|
||||
|
||||
"""
|
||||
return self.width * self.height
|
||||
|
||||
@@ -12,7 +12,6 @@ from typing import (
|
||||
ClassVar,
|
||||
Collection,
|
||||
Iterable,
|
||||
Iterator,
|
||||
NamedTuple,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user