diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-09-11 05:50:55 -0700 |
---|---|---|
committer | Jon Dufresne <jon.dufresne@gmail.com> | 2018-09-11 06:03:34 -0700 |
commit | 0d6be504ea4afc786b40ff8b87193ccdb0796951 (patch) | |
tree | 767ba9df7dc8759aaa588510121828b5d23becac /sphinx/theming.py | |
parent | 844a3a5c226ff8891a1ce139f10ac92157c75da5 (diff) | |
download | sphinx-git-0d6be504ea4afc786b40ff8b87193ccdb0796951.tar.gz |
Remove use of six.iteritems()
In Python 3, dict.items() is always an iterator.
Diffstat (limited to 'sphinx/theming.py')
-rw-r--r-- | sphinx/theming.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sphinx/theming.py b/sphinx/theming.py index 938f2ede2..957f75a54 100644 --- a/sphinx/theming.py +++ b/sphinx/theming.py @@ -16,7 +16,6 @@ from os import path from zipfile import ZipFile import pkg_resources -from six import iteritems from six.moves import configparser from sphinx import package_dir @@ -129,7 +128,7 @@ class Theme(object): except configparser.NoSectionError: pass - for option, value in iteritems(overrides): + for option, value in overrides.items(): if option not in options: logger.warning(__('unsupported theme option %r given') % option) else: @@ -174,7 +173,7 @@ class HTMLThemeFactory(object): # type: () -> None """Load built-in themes.""" themes = self.find_themes(path.join(package_dir, 'themes')) - for name, theme in iteritems(themes): + for name, theme in themes.items(): self.themes[name] = theme def load_additional_themes(self, theme_paths): @@ -183,7 +182,7 @@ class HTMLThemeFactory(object): for theme_path in theme_paths: abs_theme_path = path.abspath(path.join(self.app.confdir, theme_path)) themes = self.find_themes(abs_theme_path) - for name, theme in iteritems(themes): + for name, theme in themes.items(): self.themes[name] = theme def load_extra_theme(self, name): |