mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-11 07:11:48 +02:00
Refactor figures; get use of Python 3.9 features.
This commit is contained in:
parent
053324451a
commit
3bcf026862
36 changed files with 698 additions and 750 deletions
|
@ -11,9 +11,7 @@ __email__ = "me@enzet.ru"
|
|||
|
||||
|
||||
def test_is_bright() -> None:
|
||||
"""
|
||||
Test detecting color brightness.
|
||||
"""
|
||||
"""Test detecting color brightness."""
|
||||
assert is_bright(Color("white"))
|
||||
assert is_bright(Color("yellow"))
|
||||
assert not is_bright(Color("brown"))
|
||||
|
@ -21,9 +19,7 @@ def test_is_bright() -> None:
|
|||
|
||||
|
||||
def test_gradient() -> None:
|
||||
"""
|
||||
Test color picking from gradient.
|
||||
"""
|
||||
"""Test color picking from gradient."""
|
||||
color: Color = get_gradient_color(
|
||||
0.5, MinMax(0, 1), [Color("black"), Color("white")]
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue