Skip to content

Commit

Permalink
DOC : sixify unichr
Browse files Browse the repository at this point in the history
  • Loading branch information
tacaswell committed Jun 10, 2014
1 parent c73d9e6 commit 788f130
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 14 deletions.
7 changes: 2 additions & 5 deletions examples/pylab_examples/font_table_ttf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@
from matplotlib.font_manager import FontProperties
from pylab import figure, table, show, axis, title

try:
unichr
except NameError:
# Python 3
unichr = chr
import six
from six import unichr

# the font table grid

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
import zlib

import numpy as np
from six import unichr

if six.PY3:
from io import BytesIO
unichr = chr
else:
from cStringIO import StringIO as BytesIO
from datetime import datetime
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_qt4.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
unicode_literals)

import six

from six import unichr
import os
import re
import signal
Expand Down
3 changes: 1 addition & 2 deletions lib/matplotlib/backends/backend_svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

import six
from six.moves import xrange
if six.PY3:
unichr = chr
from six import unichr

import os, base64, tempfile, gzip, io, sys, codecs, re

Expand Down
3 changes: 1 addition & 2 deletions lib/matplotlib/mathtext.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
import six

import os, sys
if six.PY3:
unichr = chr
from six import unichr
from math import ceil
try:
set
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/tests/test_backend_qt4.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
unicode_literals)

import six

from six import unichr
from matplotlib import pyplot as plt
from matplotlib.testing.decorators import cleanup
from matplotlib.testing.decorators import knownfailureif
Expand Down
3 changes: 1 addition & 2 deletions lib/matplotlib/type1font.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@

import six
from six.moves import filter
if six.PY3:
unichr = chr
from six import unichr

import io
import itertools
Expand Down

0 comments on commit 788f130

Please sign in to comment.