|
11 | 11 |
|
12 | 12 | from sphinx.util import logging |
13 | 13 | import re |
14 | | -import six |
15 | 14 |
|
16 | 15 | from docutils import nodes |
17 | 16 |
|
|
52 | 51 | except ImportError: |
53 | 52 | from ordereddict import OrderedDict |
54 | 53 |
|
55 | | -if six.PY2: |
56 | | - from itertools import imap as map |
57 | | - |
58 | 54 | __version__ = '0.2.1' |
59 | 55 |
|
60 | 56 | __author__ = "Philipp S. Sommer" |
@@ -188,7 +184,7 @@ def get_grouped_documenters(self, all_members=False): |
188 | 184 | registry = get_documenters(self.env.app) |
189 | 185 |
|
190 | 186 | for (mname, member, isattr) in self.filter_members(members, want_all): |
191 | | - classes = [cls for cls in six.itervalues(registry) |
| 187 | + classes = [cls for cls in registry.values() |
192 | 188 | if cls.can_document_member(member, mname, isattr, self)] |
193 | 189 | if not classes: |
194 | 190 | # don't know how to document this member |
@@ -372,7 +368,7 @@ def get_doc(self, encoding=None, ignore=1): |
372 | 368 |
|
373 | 369 | doc = [] |
374 | 370 | for docstring in docstrings: |
375 | | - if not isinstance(docstring, six.text_type): |
| 371 | + if not isinstance(docstring, str): |
376 | 372 | docstring = force_decode(docstring, encoding) |
377 | 373 | doc.append(prepare_docstring(docstring, ignore)) |
378 | 374 |
|
@@ -416,7 +412,7 @@ def get_doc(self, encoding=None, ignore=1): |
416 | 412 |
|
417 | 413 | doc = [] |
418 | 414 | for docstring in docstrings: |
419 | | - if not isinstance(docstring, six.text_type): |
| 415 | + if not isinstance(docstring, str): |
420 | 416 | docstring = force_decode(docstring, encoding) |
421 | 417 | doc.append(prepare_docstring(docstring, ignore)) |
422 | 418 |
|
|
0 commit comments