pep8
This commit is contained in:
parent
f1b4e585aa
commit
f761245280
@ -555,13 +555,13 @@ def flatten_sequence_map(m):
|
|||||||
def compare_opts(opts):
|
def compare_opts(opts):
|
||||||
print('\nConfig options different from defaults:')
|
print('\nConfig options different from defaults:')
|
||||||
default_opts = load_config()
|
default_opts = load_config()
|
||||||
l = ('key_definitions', 'keymap', 'sequence_map')
|
skip = ('key_definitions', 'keymap', 'sequence_map')
|
||||||
fmt = '{{:{:d}s}}'.format(max(len(k) for k in opts
|
fmt = '{{:{:d}s}}'.format(
|
||||||
if getattr(opts, k) != getattr(defaults, k) and k not in l))
|
max(len(k) for k in opts if getattr(opts, k) != getattr(defaults, k) and k not in skip))
|
||||||
|
|
||||||
for f in sorted(defaults._fields):
|
for f in sorted(defaults._fields):
|
||||||
if getattr(opts, f) != getattr(defaults, f):
|
if getattr(opts, f) != getattr(defaults, f):
|
||||||
if f in l:
|
if f in skip:
|
||||||
continue
|
continue
|
||||||
print(title(fmt.format(f)), getattr(opts, f))
|
print(title(fmt.format(f)), getattr(opts, f))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user