diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-09-11 15:50:55 +0300 |
---|---|---|
committer | Jon Dufresne <jon.dufresne@gmail.com> | 2018-09-11 16:03:34 +0300 |
commit | 0d6be504ea4afc786b40ff8b87193ccdb0796951 (patch) | |
tree | 767ba9df7dc8759aaa588510121828b5d23becac /sphinx/ext/coverage.py | |
parent | 844a3a5c226ff8891a1ce139f10ac92157c75da5 (diff) |
Remove use of six.iteritems()
In Python 3, dict.items() is always an iterator.
Diffstat (limited to 'sphinx/ext/coverage.py')
-rw-r--r-- | sphinx/ext/coverage.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sphinx/ext/coverage.py b/sphinx/ext/coverage.py index adbf2ddee..9300c1f74 100644 --- a/sphinx/ext/coverage.py +++ b/sphinx/ext/coverage.py @@ -15,7 +15,6 @@ import inspect import re from os import path -from six import iteritems from six.moves import cPickle as pickle import sphinx @@ -73,7 +72,7 @@ class CoverageBuilder(Builder): logger.warning(__('invalid regex %r in coverage_c_regexes'), exp) self.c_ignorexps = {} # type: Dict[unicode, List[Pattern]] - for (name, exps) in iteritems(self.config.coverage_ignore_c_items): + for (name, exps) in self.config.coverage_ignore_c_items.items(): self.c_ignorexps[name] = compile_regex_list('coverage_ignore_c_items', exps) self.mod_ignorexps = compile_regex_list('coverage_ignore_modules', @@ -127,7 +126,7 @@ class CoverageBuilder(Builder): write_header(op, 'Undocumented C API elements', '=') op.write('\n') - for filename, undoc in iteritems(self.c_undoc): + for filename, undoc in self.c_undoc.items(): write_header(op, filename) for typ, name in sorted(undoc): op.write(' * %-50s [%9s]\n' % (name, typ)) @@ -247,7 +246,7 @@ class CoverageBuilder(Builder): if undoc['classes']: op.write('Classes:\n') for name, methods in sorted( - iteritems(undoc['classes'])): + undoc['classes'].items()): if not methods: op.write(' * %s\n' % name) else: |