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 d604681

Browse filesBrowse files
committed
backend_pgf: fix str/unicode comparison errors
1 parent 9310a2b commit d604681
Copy full SHA for d604681

File tree

1 file changed

+4
-4
lines changed
Filter options

1 file changed

+4
-4
lines changed

‎lib/matplotlib/backends/backend_pgf.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_pgf.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ def get_fontspec():
5252
latex_fontspec = []
5353
texcommand = get_texcommand()
5454

55-
if texcommand is not "pdflatex":
55+
if texcommand != "pdflatex":
5656
latex_fontspec.append("\\usepackage{fontspec}")
5757

58-
if texcommand is not "pdflatex" and rcParams.get("pgf.rcfonts", True):
58+
if texcommand != "pdflatex" and rcParams.get("pgf.rcfonts", True):
5959
# try to find fonts from rc parameters
6060
families = ["serif", "sans-serif", "monospace"]
6161
fontspecs = [r"\setmainfont{%s}", r"\setsansfont{%s}",
@@ -139,7 +139,7 @@ def _font_properties_str(prop):
139139
family = prop.get_family()[0]
140140
if family in families:
141141
commands.append(families[family])
142-
elif family in system_fonts and get_texcommand() is not "pdflatex":
142+
elif family in system_fonts and get_texcommand() != "pdflatex":
143143
commands.append(r"\setmainfont{%s}\rmfamily" % family)
144144
else:
145145
pass # print warning?
@@ -173,7 +173,7 @@ def make_pdf_to_png_converter():
173173
pass
174174
# check for ghostscript
175175
try:
176-
gs = "gs" if sys.platform is not "win32" else "gswin32c"
176+
gs = "gs" if sys.platform != "win32" else "gswin32c"
177177
check_output([gs, "-v"], stderr=subprocess.STDOUT)
178178
tools_available.append("gs")
179179
except:

0 commit comments

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