mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-20 05:07:53 -06:00
klippy: Prefer python dictionary comprehension to dict() call
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
38411fd2e7
commit
01ee9e16c5
3 changed files with 6 additions and 6 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue