diff options
author | Takayuki Shimizukawa <shimizukawa@gmail.com> | 2014-04-29 21:20:56 +0900 |
---|---|---|
committer | Takayuki Shimizukawa <shimizukawa@gmail.com> | 2014-04-29 21:20:56 +0900 |
commit | ce4d342e20739ab994a451f367d5bce2c5edb5d2 (patch) | |
tree | 025c7e7b7248a22c3ee04d413635c385fc5e8c49 /sphinx/ext/coverage.py | |
parent | c3c879f2c63afbb39ad4d76ecc083cddd41d9946 (diff) | |
download | sphinx-git-ce4d342e20739ab994a451f367d5bce2c5edb5d2.tar.gz |
use six privided iteritems(),itervalues() to support py2/py3 in one source. refs #1350.
Diffstat (limited to 'sphinx/ext/coverage.py')
-rw-r--r-- | sphinx/ext/coverage.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sphinx/ext/coverage.py b/sphinx/ext/coverage.py index 24477b426..3cf0ff55c 100644 --- a/sphinx/ext/coverage.py +++ b/sphinx/ext/coverage.py @@ -15,6 +15,7 @@ import glob import inspect from os import path +from six import iteritems from six.moves import cPickle as pickle from sphinx.builders import Builder @@ -53,7 +54,7 @@ class CoverageBuilder(Builder): self.warn('invalid regex %r in coverage_c_regexes' % exp) self.c_ignorexps = {} - for (name, exps) in self.config.coverage_ignore_c_items.iteritems(): + for (name, exps) in iteritems(self.config.coverage_ignore_c_items): self.c_ignorexps[name] = compile_regex_list( 'coverage_ignore_c_items', exps, self.warn) self.mod_ignorexps = compile_regex_list( @@ -110,7 +111,7 @@ class CoverageBuilder(Builder): write_header(op, 'Undocumented C API elements', '=') op.write('\n') - for filename, undoc in self.c_undoc.iteritems(): + for filename, undoc in iteritems(self.c_undoc): write_header(op, filename) for typ, name in undoc: op.write(' * %-50s [%9s]\n' % (name, typ)) @@ -230,7 +231,7 @@ class CoverageBuilder(Builder): if undoc['classes']: op.write('Classes:\n') for name, methods in sorted( - undoc['classes'].iteritems()): + iteritems(undoc['classes'])): if not methods: op.write(' * %s\n' % name) else: |