From 01ee9e16c5f7820b74d1018c130a842767edd44b Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 6 Jun 2017 12:35:13 -0400 Subject: klippy: Prefer python dictionary comprehension to dict() call Signed-off-by: Kevin O'Connor --- klippy/klippy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'klippy/klippy.py') diff --git a/klippy/klippy.py b/klippy/klippy.py index 73819f62..58898374 100644 --- a/klippy/klippy.py +++ b/klippy/klippy.py @@ -182,7 +182,7 @@ class Printer: self.objects['toolhead'] = toolhead.ToolHead( self, ConfigWrapper(self, 'printer')) # Validate that there are no undefined parameters in the config file - valid_sections = dict([(s, 1) for s, o in self.all_config_options]) + valid_sections = { s: 1 for s, o in self.all_config_options } for section in self.fileconfig.sections(): section = section.lower() if section not in valid_sections: -- cgit v1.2.3-70-g09d2