Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7120b5a

Browse filesBrowse files
authored
Merge pull request #28062 from meeseeksmachine/auto-backport-of-pr-28056-on-v3.9.x
Backport PR #28056 on branch v3.9.x (Strip trailing spaces from log-formatter cursor output.)
2 parents 2ae90bd + 28ab92e commit 7120b5a
Copy full SHA for 7120b5a

File tree

2 files changed

+6
-6
lines changed
Filter options

2 files changed

+6
-6
lines changed

‎lib/matplotlib/tests/test_ticker.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_ticker.py
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,11 +1177,11 @@ def test_pprint(self, value, domain, expected):
11771177
assert label == expected
11781178

11791179
@pytest.mark.parametrize('value, long, short', [
1180-
(0.0, "0", "0 "),
1181-
(0, "0", "0 "),
1182-
(-1.0, "-10^0", "-1 "),
1183-
(2e-10, "2x10^-10", "2e-10 "),
1184-
(1e10, "10^10", "1e+10 "),
1180+
(0.0, "0", "0"),
1181+
(0, "0", "0"),
1182+
(-1.0, "-10^0", "-1"),
1183+
(2e-10, "2x10^-10", "2e-10"),
1184+
(1e10, "10^10", "1e+10"),
11851185
])
11861186
def test_format_data(self, value, long, short):
11871187
fig, ax = plt.subplots()

‎lib/matplotlib/ticker.py

Copy file name to clipboardExpand all lines: lib/matplotlib/ticker.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ def format_data(self, value):
10241024

10251025
def format_data_short(self, value):
10261026
# docstring inherited
1027-
return '%-12g' % value
1027+
return ('%-12g' % value).rstrip()
10281028

10291029
def _pprint_val(self, x, d):
10301030
# If the number is not too big and it's an int, format it as an int.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.