Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/matplotlib/testing/jpl_units/Duration.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ def __init__(self, frame, seconds):
- frame The frame of the duration. Must be 'ET' or 'UTC'
- seconds The number of seconds in the Duration.
"""
_api.check_in_list(self.allowed, frame=frame)
# Use local variable to eliminate attribute lookup in check_in_list
allowed = Duration.allowed
_api.check_in_list(allowed, frame=frame)
self._frame = frame
self._seconds = seconds

Expand Down Expand Up @@ -135,4 +137,5 @@ def checkSameFrame(self, rhs, func):
raise ValueError(
f"Cannot {func} Durations with different frames.\n"
f"LHS: {self._frame}\n"
f"RHS: {rhs._frame}")
f"RHS: {rhs._frame}"
)