8000 Remove unused, outdated division operators on jpl_units. · matplotlib/matplotlib@42d5aa2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 42d5aa2

Browse files
committed
Remove unused, outdated division operators on jpl_units.
Py3 doesn't have `__div__`, it has `__truediv__` and `__floordiv__`. Given that no one has ever complained about this, I am going to boldly claim that no one is using division of jpl_units on Py3, and just delete them without providing replacements.
1 parent 76c764c commit 42d5aa2

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

lib/matplotlib/testing/jpl_units/Duration.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -132,28 +132,6 @@ def __rmul__(self, lhs):
132132
"""
133133
return Duration(self._frame, self._seconds * float(lhs))
134134

135-
def __div__(self, rhs):
136-
"""Divide a Duration by a value.
137-
138-
= INPUT VARIABLES
139-
- rhs The scalar to divide by.
140-
141-
= RETURN VALUE
142-
- Returns the scaled Duration.
143-
"""
144-
return Duration(self._frame, self._seconds / rhs)
145-
146-
def __rdiv__(self, rhs):
147-
"""Divide a Duration by a value.
148-
149-
= INPUT VARIABLES
150-
- rhs The scalar to divide by.
151-
152-
= RETURN VALUE
153-
- Returns the scaled Duration.
154-
"""
155-
return Duration(self._frame, rhs / self._seconds)
156-
157135
def __str__(self):
158136
"""Print the Duration."""
159137
return "%g %s" % (self._seconds, self._frame)

lib/matplotlib/testing/jpl_units/UnitDbl.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,6 @@ def __rmul__(self, lhs):
175175
"""
176176
return UnitDbl(self._value * lhs, self._units)
177177

178-
def __div__(self, rhs):
179-
"""Divide a UnitDbl by a value.
180-
181-
= INPUT VARIABLES
182-
- rhs The scalar to divide by.
183-
184-
= RETURN VALUE
185-
- Returns the scaled UnitDbl.
186-
"""
187-
return UnitDbl(self._value / rhs, self._units)
188-
189178
def __str__(self):
190179
"""Print the UnitDbl."""
191180
return "%g *%s" % (self._value, self._units)

0 commit comments

Comments
 (0)
0