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 6511253

Browse filesBrowse files
authored
Merge pull request #10806 from tacaswell/fix_escapes
MNT: catch more illegal '\'
2 parents cc7d086 + 0e8a39f commit 6511253
Copy full SHA for 6511253

File tree

Expand file treeCollapse file tree

2 files changed

+14
-14
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+14
-14
lines changed

‎lib/matplotlib/backends/backend_pgf.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_pgf.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252

5353
_luatex_version_re = re.compile(
54-
'This is LuaTeX, Version (?:beta-)?([0-9]+)\.([0-9]+)\.([0-9]+)'
54+
r'This is LuaTeX, Version (?:beta-)?([0-9]+)\.([0-9]+)\.([0-9]+)'
5555
)
5656

5757

@@ -1199,7 +1199,7 @@ def savefig(self, figure=None, **kwargs):
11991199
figure.canvas = orig_canvas
12001200

12011201
def _build_newpage_command(self, width, height):
1202-
'''LuaLaTeX from version 0.85 removed the `\pdf*` primitives,
1202+
r'''LuaLaTeX from version 0.85 removed the `\pdf*` primitives,
12031203
so we need to check the lualatex version and use `\pagewidth` if
12041204
the version is 0.85 or newer
12051205
'''

‎lib/mpl_toolkits/axisartist/angle_helper.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/axisartist/angle_helper.py
+12-12Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -209,18 +209,18 @@ def __call__(self, v1, v2):
209209

210210

211211
class FormatterDMS(object):
212-
deg_mark = "^{\circ}"
213-
min_mark = "^{\prime}"
214-
sec_mark = "^{\prime\prime}"
212+
deg_mark = r"^{\circ}"
213+
min_mark = r"^{\prime}"
214+
sec_mark = r"^{\prime\prime}"
215215

216216
fmt_d = "$%d" + deg_mark + "$"
217217
fmt_ds = r"$%d.%s" + deg_mark + "$"
218218

219219
# %s for sign
220-
fmt_d_m = r"$%s%d" + deg_mark + "\,%02d" + min_mark + "$"
221-
fmt_d_ms = r"$%s%d" + deg_mark + "\,%02d.%s" + min_mark + "$"
220+
fmt_d_m = r"$%s%d" + deg_mark + r"\,%02d" + min_mark + "$"
221+
fmt_d_ms = r"$%s%d" + deg_mark + r"\,%02d.%s" + min_mark + "$"
222222

223-
fmt_d_m_partial = "$%s%d" + deg_mark + "\,%02d" + min_mark + "\,"
223+
fmt_d_m_partial = "$%s%d" + deg_mark + r"\,%02d" + min_mark + r"\,"
224224
fmt_s_partial = "%02d" + sec_mark + "$"
225225
fmt_ss_partial = "%02d.%s" + sec_mark + "$"
226226

@@ -315,18 +315,18 @@ def __call__(self, direction, factor, values):
315315

316316

317317
class FormatterHMS(FormatterDMS):
318-
deg_mark = "^\mathrm{h}"
319-
min_mark = "^\mathrm{m}"
320-
sec_mark = "^\mathrm{s}"
318+
deg_mark = r"^\mathrm{h}"
319+
min_mark = r"^\mathrm{m}"
320+
sec_mark = r"^\mathrm{s}"
321321

322322
fmt_d = "$%d" + deg_mark + "$"
323323
fmt_ds = r"$%d.%s" + deg_mark + "$"
324324

325325
# %s for sign
326-
fmt_d_m = r"$%s%d" + deg_mark + "\,%02d" + min_mark+"$"
327-
fmt_d_ms = r"$%s%d" + deg_mark + "\,%02d.%s" + min_mark+"$"
326+
fmt_d_m = r"$%s%d" + deg_mark + r"\,%02d" + min_mark+"$"
327+
fmt_d_ms = r"$%s%d" + deg_mark + r"\,%02d.%s" + min_mark+"$"
328328

329-
fmt_d_m_partial = "$%s%d" + deg_mark + "\,%02d" + min_mark + "\,"
329+
fmt_d_m_partial = "$%s%d" + deg_mark + r"\,%02d" + min_mark + r"\,"
330330
fmt_s_partial = "%02d" + sec_mark + "$"
331331
fmt_ss_partial = "%02d.%s" + sec_mark + "$"
332332

0 commit comments

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