|
17 | 17 | # For some later history, see
|
18 | 18 | # http://thread.gmane.org/gmane.comp.python.matplotlib.devel/7068
|
19 | 19 |
|
20 |
| -from __future__ import (absolute_import, division, print_function, |
21 |
| - unicode_literals) |
22 |
| - |
23 |
| -import six |
24 |
| - |
25 | 20 | import os
|
26 | 21 | import inspect
|
27 | 22 | import random
|
@@ -154,7 +149,7 @@ def boilerplate_gen():
|
154 | 149 | 'semilogx',
|
155 | 150 | 'semilogy',
|
156 | 151 | 'specgram',
|
157 |
| - #'spy', |
| 152 | + # 'spy', |
158 | 153 | 'stackplot',
|
159 | 154 | 'stem',
|
160 | 155 | 'step',
|
@@ -233,22 +228,10 @@ def format_value(value):
|
233 | 228 | has_data = 'data' in inspect.signature(base_func).parameters
|
234 | 229 | work_func = inspect.unwrap(base_func)
|
235 | 230 |
|
236 |
| - if six.PY2: |
237 |
| - args, varargs, varkw, defaults = inspect.getargspec(work_func) |
238 |
| - else: |
239 |
| - (args, varargs, varkw, defaults, kwonlyargs, kwonlydefs, |
240 |
| - annotations) = inspect.getfullargspec(work_func) |
| 231 | + (args, varargs, varkw, defaults, kwonlyargs, kwonlydefs, |
| 232 | + annotations) = inspect.getfullargspec(work_func) |
241 | 233 | args.pop(0) # remove 'self' argument
|
242 |
| - if defaults is None: |
243 |
| - defaults = () |
244 |
| - else: |
245 |
| - def_edited = [] |
246 |
| - for val in defaults: |
247 |
| - if six.PY2: |
248 |
| - if isinstance(val, unicode): |
249 |
| - val = val.encode('ascii', 'ignore') |
250 |
| - def_edited.append(val) |
251 |
| - defaults = tuple(def_edited) |
| 234 | + defaults = tuple(defaults or ()) |
252 | 235 |
|
253 | 236 | # Add a data keyword argument if needed (fmt is PLOT_TEMPLATE) and
|
254 | 237 | # possible (if *args is used, we can't just add a data
|
|
0 commit comments