diff options
| author | Franziska Kunsmann <hi@kunsmann.eu> | 2023-05-01 20:51:04 +0200 |
|---|---|---|
| committer | Franziska Kunsmann <hi@kunsmann.eu> | 2023-05-01 20:51:04 +0200 |
| commit | 08463df7f4174dca61504ca3be2d2517b13b0375 (patch) | |
| tree | 49df1b2656e3b7b0292814a9417fb57e3e937299 /main.py | |
| parent | b3c36ce799d4368d4c228426a8a547e26aa095d6 (diff) | |
code style
Diffstat (limited to 'main.py')
| -rwxr-xr-x | main.py | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -2,7 +2,7 @@ import gi -gi.require_version('Gtk', '3.0') +gi.require_version("Gtk", "3.0") import logging from os import environ @@ -14,27 +14,30 @@ from gui import PyATEMSwitcherGui from switcher import PyATEMSwitcher LOGLEVELS = { - 'debug': logging.DEBUG, - 'error': logging.ERROR, - 'info': logging.INFO, - 'warn': logging.WARNING, + "debug": logging.DEBUG, + "error": logging.ERROR, + "info": logging.INFO, + "warn": logging.WARNING, } def main(): - with open(environ.get('PYATEMSWITCHER_CONFIG', 'config.toml')) as f: + with open(environ.get("PYATEMSWITCHER_CONFIG", "config.toml")) as f: config = load(f) settings = Gtk.Settings.get_default() - for k, v in config.get('gtk-settings').items(): - settings.set_property(k, v) # TODO find out if we can just pass a dict somewhere + for k, v in config.get("gtk-settings").items(): + settings.set_property( + k, v + ) # TODO find out if we can just pass a dict somewhere - logging.basicConfig(**config.get('logging', {})) + logging.basicConfig(**config.get("logging", {})) switcher = PyATEMSwitcher(config) gui = PyATEMSwitcherGui(config, switcher) gui.main_loop() -if __name__ == '__main__': + +if __name__ == "__main__": main() |
