Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f349077

Browse files
committed
Remove unneeded compatibility code
- replace the single use of six.moves.map with a list comprehension - io.BytesIO is included in all versions of Python we support - the set type is a builtin in all versions of Python we support
1 parent 0385034 commit f349077

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/matplotlib/backends/backend_pdf.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
unicode_literals)
99

1010
import six
11-
from six.moves import map
1211

1312
import codecs
1413
import os
@@ -20,14 +19,10 @@
2019

2120
import numpy as np
2221
from six import unichr
23-
from six import BytesIO
22+
from io import BytesIO
2423

2524
from datetime import datetime
2625
from math import ceil, cos, floor, pi, sin
27-
try:
28-
set
29-
except NameError:
30-
from sets import Set as set
3126

3227
import matplotlib
3328
from matplotlib import __version__, rcParams
@@ -592,7 +587,7 @@ def write(self, data):
592587
self.currentstream.write(data)
593588

594589
def output(self, *data):
595-
self.write(fill(list(map(pdfRepr, data))))
590+
self.write(fill([pdfRepr(x) for x in data]))
596591
self.write(b'\n')
597592

598593
def beginStream(self, id, len, extra=None):

0 commit comments

Comments
 (0)