Skip to content

Commit 00dd16d

Browse files
committed
vpython: set default value for capture_labels explicitly
1 parent 0fdd90b commit 00dd16d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

vpython/vpython.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3138,17 +3138,14 @@ def pixel_to_world(self):
31383138
def pixel_to_world(self, value):
31393139
raise AttributeError('pixel_to_world is read-only')
31403140

3141-
def capture(self, filename, capture_labels=None):
3141+
def capture(self, filename, capture_labels=True):
31423142
if not isinstance(filename, str):
31433143
raise TypeError("'filename' for Capture must be a string.")
31443144

31453145
if filename[-4:] != ".png":
31463146
filename += ".png"
31473147

3148-
include_labels = "T"
3149-
if capture_labels is not None:
3150-
include_labels = "T" if capture_labels else "F"
3151-
3148+
include_labels = "T" if capture_labels else "F"
31523149
self.addmethod("capture", include_labels + filename)
31533150

31543151
@property

0 commit comments

Comments
 (0)