mirror of
https://github.com/gumyr/build123d.git
synced 2025-12-05 18:20:46 -08:00
Remove depreciated Color.to_tuple
This commit is contained in:
parent
cc34b5a743
commit
083cb1611c
2 changed files with 0 additions and 14 deletions
|
|
@ -1319,16 +1319,6 @@ class Color:
|
|||
self.iter_index += 1
|
||||
return value
|
||||
|
||||
def to_tuple(self):
|
||||
"""Value as tuple"""
|
||||
warnings.warn(
|
||||
"to_tuple is deprecated and will be removed in a future version. "
|
||||
"Use 'tuple(Color)' instead.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
return tuple(self)
|
||||
|
||||
def __copy__(self) -> Color:
|
||||
"""Return copy of self"""
|
||||
return Color(*tuple(self))
|
||||
|
|
|
|||
|
|
@ -167,10 +167,6 @@ def test_rgba_wrapped():
|
|||
assert c.wrapped.GetRGB().Blue() == 0.0
|
||||
assert c.wrapped.Alpha() == 0.5
|
||||
|
||||
def test_to_tuple():
|
||||
c = Color("blue", alpha=0.5)
|
||||
np.testing.assert_allclose(tuple(c), (0, 0, 1, 0.5), rtol=1e-5)
|
||||
|
||||
def test_copy():
|
||||
c = Color(0.1, 0.2, 0.3, alpha=0.4)
|
||||
c_copy = copy.copy(c)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue