comparison sat_frontends/primitivus/config.py @ 2624:56f94936df1e

code style reformatting using black
author Goffi <goffi@goffi.org>
date Wed, 27 Jun 2018 20:14:46 +0200
parents 26edcf3a30eb
children 003b8b4b56a7
comparison
equal deleted inserted replaced
2623:49533de4540b 2624:56f94936df1e
36 except ConfigParser.NoSectionError: 36 except ConfigParser.NoSectionError:
37 options = [] 37 options = []
38 shortcuts = {} 38 shortcuts = {}
39 for name, value in options: 39 for name, value in options:
40 if name.startswith(C.CONFIG_OPT_KEY_PREFIX.lower()): 40 if name.startswith(C.CONFIG_OPT_KEY_PREFIX.lower()):
41 action = name[len(C.CONFIG_OPT_KEY_PREFIX):].upper() 41 action = name[len(C.CONFIG_OPT_KEY_PREFIX) :].upper()
42 shortcut = value 42 shortcut = value
43 if not action or not shortcut: 43 if not action or not shortcut:
44 raise ValueError("Bad option: {} = {}".format(name, value)) 44 raise ValueError("Bad option: {} = {}".format(name, value))
45 shortcuts[action] = shortcut 45 shortcuts[action] = shortcut
46 if name == "disable_mouse": 46 if name == "disable_mouse":