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]] [[package]]
name = "mkdocs-material" name = "mkdocs-material"
version = "8.3.9" version = "8.4.1"
description = "Documentation that simply works" description = "Documentation that simply works"
category = "dev" category = "dev"
optional = false optional = false

View File

@@ -1,13 +1,10 @@
""" """
Manages Color in Textual. 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 exception should be when passing things to a Rich renderable, which will need to use the
`rich_color` attribute to perform a conversion. `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 from __future__ import annotations

View File

@@ -357,12 +357,13 @@ class Region(NamedTuple):
@property @property
def column_span(self) -> tuple[int, int]: 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. The end value is exclusive.
Returns: Returns:
tuple[int, int]: Pair of x coordinates (column numbers). tuple[int, int]: Pair of x coordinates (column numbers).
""" """
return (self.x, self.x + self.width) return (self.x, self.x + self.width)
@@ -374,6 +375,7 @@ class Region(NamedTuple):
Returns: Returns:
tuple[int, int]: Pair of y coordinates (line numbers). tuple[int, int]: Pair of y coordinates (line numbers).
""" """
return (self.y, self.y + self.height) return (self.y, self.y + self.height)
@@ -402,7 +404,7 @@ class Region(NamedTuple):
"""Get the area within the region. """Get the area within the region.
Returns: Returns:
int: area. int: Area covered by this region.
""" """
return self.width * self.height return self.width * self.height

View File

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