Skip to content

Commit 557514d

Browse files
committed
Switch to min() for ordered list
Signed-off-by: Mike Stitt <mike@stitt.cc>
1 parent 364f141 commit 557514d

File tree

2 files changed

+2
-26
lines changed

2 files changed

+2
-26
lines changed

subprojects/robotpy-wpilib/tests/test_timedrobot.py

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,7 @@ def _robotThread(self, robot: TimedRobotPy) -> None:
121121
print("Stack trace:")
122122
traceback.print_exc()
123123

124-
# Alternatively, get the formatted traceback as a string:
125-
# formatted_traceback = traceback.format_exc()
126-
# print(formatted_traceback)
127-
128-
# Rethrow the exception to propagate it up the call stack
124+
# Rethrow the exception to propagate it up the call stack
129125
raise
130126

131127
finally:
@@ -171,10 +167,6 @@ def runRobot(self) -> None:
171167
print("Stack trace:")
172168
traceback.print_exc()
173169

174-
# Alternatively, get the formatted traceback as a string:
175-
# formatted_traceback = traceback.format_exc()
176-
# print(formatted_traceback)
177-
178170
# Rethrow the exception to propagate it up the call stack
179171
raise
180172
finally:
@@ -391,10 +383,6 @@ def startCompetition(self) -> None:
391383
print("Stack trace:")
392384
traceback.print_exc()
393385

394-
# Alternatively, get the formatted traceback as a string:
395-
# formatted_traceback = traceback.format_exc()
396-
# print(formatted_traceback)
397-
398386
# Rethrow the exception to propagate it up the call stack
399387
raise
400388

@@ -406,10 +394,6 @@ def startCompetition(self) -> None:
406394
print("Stack trace:")
407395
traceback.print_exc()
408396

409-
# Alternatively, get the formatted traceback as a string:
410-
# formatted_traceback = traceback.format_exc()
411-
# print(formatted_traceback)
412-
413397
# Rethrow the exception to propagate it up the call stack
414398
raise
415399

@@ -439,10 +423,6 @@ def startCompetition(self) -> None:
439423
print("Stack trace:")
440424
traceback.print_exc()
441425

442-
# Alternatively, get the formatted traceback as a string:
443-
# formatted_traceback = traceback.format_exc()
444-
# print(formatted_traceback)
445-
446426
# Rethrow the exception to propagate it up the call stack
447427
raise
448428
except Exception as e:
@@ -453,10 +433,6 @@ def startCompetition(self) -> None:
453433
print("Stack trace:")
454434
traceback.print_exc()
455435

456-
# Alternatively, get the formatted traceback as a string:
457-
# formatted_traceback = traceback.format_exc()
458-
# print(formatted_traceback)
459-
460436
# Rethrow the exception to propagate it up the call stack
461437
raise
462438

subprojects/robotpy-wpilib/wpilib/timedrobotpy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def __repr__(self) -> str:
179179
return str(sorted(self._data))
180180

181181
# Hooks to use timeit to evaluate configurations of TimedRobotPy
182-
_OrderedList = _OrderedListSort
182+
_OrderedList = _OrderedListMin
183183
_initializeNotifier = initializeNotifier
184184
_setNotifierName = setNotifierName
185185
_observeUserProgramStarting = observeUserProgramStarting

0 commit comments

Comments
 (0)