Skip to content

Commit 166ac9d

Browse files
authored
Merge pull request #1401 from compas-dev/fix-doctest
Fix remaining/new doctest failures
2 parents fa49860 + 86f3912 commit 166ac9d

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
* Fixed bug in `Box.scaled` causing a `TypeError` due to incorrect parameter forwarding.
1818
* Changed argument names of `Box.scale()` to `x`, `y`, `z`, instead of `factor` and made `y` and `z` optional to keep positional arguments backwards compatible.
1919
* Fixed import errors in `compas_rhino.conduits` for Rhino 8.
20+
* Fixed doctest failures.
2021
* Fixed bug in serialization when `compas.datastructures.attributes.AttributeView` is used.
2122

2223
### Removed

src/compas/colors/color.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class Color(Data):
9999
By default, this class will create a color with the RGB components in the range ``[0.0, 1.0]``.
100100
101101
>>> Color(1, 0, 0)
102-
Color(1, 0, 0, alpha=1.0)
102+
Color(red=1, green=0, blue=0, alpha=1.0)
103103
104104
Attempting to create a color with components outside of the range ``[0.0, 1.0]`` will raise a ``ValueError``.
105105
@@ -111,7 +111,7 @@ class Color(Data):
111111
To create a color with components in the range ``[0, 255]``, use the :meth:`from_rgb255` constructor.
112112
113113
>>> Color.from_rgb255(255, 0, 0)
114-
Color(1.0, 0.0, 0.0, alpha=1.0)
114+
Color(red=1.0, green=0.0, blue=0.0, alpha=1.0)
115115
116116
Similarly, other constructors are available to create colors from other color spaces.
117117
@@ -132,13 +132,13 @@ class Color(Data):
132132
133133
>>> color = Color.red()
134134
>>> color.desaturated(25)
135-
Color(0.875, 0.125, 0.125, alpha=1.0)
135+
Color(red=0.875, green=0.125, blue=0.125, alpha=1.0)
136136
>>> color.desaturated(50)
137-
Color(0.75, 0.25, 0.25, alpha=1.0)
137+
Color(red=0.75, green=0.25, blue=0.25, alpha=1.0)
138138
>>> color.desaturated(75)
139-
Color(0.625, 0.375, 0.375, alpha=1.0)
139+
Color(red=0.625, green=0.375, blue=0.375, alpha=1.0)
140140
>>> color.desaturated(100)
141-
Color(0.5, 0.5, 0.5, alpha=1.0)
141+
Color(red=0.5, green=0.5, blue=0.5, alpha=1.0)
142142
143143
See Also
144144
--------

src/compas/datastructures/tree/hashtree.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
import hashlib
23

34
from compas.data import Data

src/compas/scene/scene.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ def clear(self, clear_scene=True, clear_context=True):
163163
-----
164164
To redraw the scene, without modifying any of the other objects in the visualisation context:
165165
166-
>>> scene.clear(clear_scene=False, clear_context=True)
167-
>>> scene.draw()
166+
>>> scene.clear(clear_scene=False, clear_context=True) # doctest: +SKIP
167+
>>> scene.draw() # doctest: +SKIP
168168
169169
"""
170170
guids = []
@@ -209,7 +209,6 @@ def redraw(self):
209209
before drawing all scene objects in the scene tree.
210210
211211
"""
212-
213212
self.clear(clear_scene=False, clear_context=True)
214213
self.draw()
215214

0 commit comments

Comments
 (0)