Format And Lint Config Files
The command line mpf format
can reformat your MPF configs.
Run it using mpf format path/to/your_file.yaml
. It will show you a
preview of the changes it your make:
$ mpf format config/config.yaml
Parsing single test config/config.yaml.
Config is not linted.
---
+++
@@ -1,13 +1,13 @@
#config_version=5
config:
-- shots.yaml
-- switches.yaml
-- coils.yaml
-- devices.yaml
-- leds.yaml
-- slides.yaml
-- sound.yaml
+ - shots.yaml
+ - switches.yaml
+ - coils.yaml
+ - devices.yaml
+ - leds.yaml
+ - slides.yaml
+ - sound.yaml
mpf:
device_modules:
@@ -203,7 +203,7 @@
0.54: servo_pos2
ball_search_min: 0.35
ball_search_max: 0.55
* debug: True
+ debug: true
servo_figure_back:
number: servo_back-64-0
reset_events: machine_reset_phase_3
@@ -217,8 +217,7 @@
0.31: servo_pos2
ball_search_min: 0.1
ball_search_max: 0.3
* debug: True
+ debug: true
Not writing back changes. Use --yes to do this.
You can add --yes
to the commandline to apply the changes.
Something missing or wrong? You can fix it!
This website is edited by people like you! Is something wrong or missing? Is something out of date, or can you explain it better?
Please help us! You can fix it yourself and be an official "open source" contributor!
It's easy! See our Beginner's guide to editing the docs.
Page navigation via the keyboard: < >
You can navigate this site via the keyboard. There are two modes:
General navigation, when search is not focused:
- F , S , / : open search dialog
- P , , : go to previous page
- N , . : go to next page
While using the search function:
- Down , Up : select next / previous result
- Esc , Tab : close search
- Enter : go to highlighted page in the results