doc update

This commit is contained in:
Will McGugan
2022-08-24 15:24:04 +01:00
parent c0a631ac49
commit f4d5ebb37f
4 changed files with 6 additions and 8 deletions

2
poetry.lock generated
View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -12,7 +12,6 @@ from typing import (
ClassVar,
Collection,
Iterable,
Iterator,
NamedTuple,
)