|
17 | 17 |
|
18 | 18 | The object-oriented API is recommended for more complex plots. |
19 | 19 | """ |
20 | | -from __future__ import (absolute_import, division, print_function, |
21 | | - unicode_literals) |
22 | | - |
23 | | -import six |
24 | 20 |
|
25 | 21 | import inspect |
26 | 22 | from numbers import Number |
@@ -504,7 +500,7 @@ def figure(num=None, # autoincrement if None, else integer from 1-N |
504 | 500 | figLabel = '' |
505 | 501 | if num is None: |
506 | 502 | num = next_num |
507 | | - elif isinstance(num, six.string_types): |
| 503 | + elif isinstance(num, str): |
508 | 504 | figLabel = num |
509 | 505 | allLabels = get_figlabels() |
510 | 506 | if figLabel not in allLabels: |
@@ -655,13 +651,13 @@ def close(*args): |
655 | 651 | arg = args[0] |
656 | 652 | if arg == 'all': |
657 | 653 | _pylab_helpers.Gcf.destroy_all() |
658 | | - elif isinstance(arg, six.integer_types): |
| 654 | + elif isinstance(arg, int): |
659 | 655 | _pylab_helpers.Gcf.destroy(arg) |
660 | 656 | elif hasattr(arg, 'int'): |
661 | 657 | # if we are dealing with a type UUID, we |
662 | 658 | # can use its integer representation |
663 | 659 | _pylab_helpers.Gcf.destroy(arg.int) |
664 | | - elif isinstance(arg, six.string_types): |
| 660 | + elif isinstance(arg, str): |
665 | 661 | allLabels = get_figlabels() |
666 | 662 | if arg in allLabels: |
667 | 663 | num = get_fignums()[allLabels.index(arg)] |
@@ -2449,7 +2445,7 @@ def plotfile(fname, cols=(0,), plotfuncs=None, |
2449 | 2445 |
|
2450 | 2446 | def getname_val(identifier): |
2451 | 2447 | 'return the name and column data for identifier' |
2452 | | - if isinstance(identifier, six.string_types): |
| 2448 | + if isinstance(identifier, str): |
2453 | 2449 | return identifier, r[identifier] |
2454 | 2450 | elif isinstance(identifier, Number): |
2455 | 2451 | name = r.dtype.names[int(identifier)] |
|
0 commit comments