|
2 | 2 | import sys |
3 | 3 | import locale |
4 | 4 | from itertools import chain |
5 | | -from six import iterkeys, iteritems |
| 5 | +from six import iterkeys |
6 | 6 | from configparser import ConfigParser |
7 | 7 |
|
8 | 8 | from .autocomplete import SIMPLE as default_completion, ALL_MODES |
@@ -47,7 +47,7 @@ def fill_config_with_default_values(config, default_values): |
47 | 47 | if not config.has_section(section): |
48 | 48 | config.add_section(section) |
49 | 49 |
|
50 | | - for (opt, val) in iteritems(default_values[section]): |
| 50 | + for (opt, val) in default_values[section].items(): |
51 | 51 | if not config.has_option(section, opt): |
52 | 52 | config.set(section, opt, "%s" % (val,)) |
53 | 53 |
|
@@ -122,9 +122,9 @@ def loadini(struct, configfile): |
122 | 122 | "curtsies": {"list_above": False, "right_arrow_completion": True,}, |
123 | 123 | } |
124 | 124 |
|
125 | | - default_keys_to_commands = dict( |
126 | | - (value, key) for (key, value) in iteritems(defaults["keyboard"]) |
127 | | - ) |
| 125 | + default_keys_to_commands = { |
| 126 | + value: key for (key, value) in defaults["keyboard"].items() |
| 127 | + } |
128 | 128 |
|
129 | 129 | fill_config_with_default_values(config, defaults) |
130 | 130 | try: |
@@ -314,6 +314,6 @@ def load_theme(struct, path, colors, default_colors): |
314 | 314 | colors[k] = theme.get("interface", k) |
315 | 315 |
|
316 | 316 | # Check against default theme to see if all values are defined |
317 | | - for k, v in iteritems(default_colors): |
| 317 | + for k, v in default_colors.items(): |
318 | 318 | if k not in colors: |
319 | 319 | colors[k] = v |
0 commit comments