File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,11 @@ def config_view(setting: str) -> None:
2828 """View a config setting."""
2929 # Get the settings, show all settings if no specific one is specified
3030 settings = circfirm .cli .get_settings ()
31+
32+ removable = "\n "
33+
3134 if not setting :
32- click .echo (yaml .safe_dump (settings , indent = 4 ))
35+ click .echo (yaml .safe_dump (settings , indent = 4 ). removesuffix ( removable ) )
3336 return
3437
3538 # Get the specified settings
@@ -44,7 +47,8 @@ def config_view(setting: str) -> None:
4447 # Show the specified setting
4548 output = yaml .safe_dump (value , indent = 4 )
4649 if not isinstance (value , (list , dict )):
47- output = output .removesuffix ("\n ...\n " )
50+ removable += "...\n "
51+ output = output .removesuffix (removable )
4852 click .echo (output )
4953
5054
Original file line number Diff line number Diff line change 1- editor : " "
1+ editor : ' '
22output :
33 supporting :
44 silence : false
55token :
6- github : " "
6+ github : ' '
Original file line number Diff line number Diff line change 1919def get_printed_default_settings () -> None :
2020 """Get the default (template) settings as printed."""
2121 with open ("circfirm/templates/settings.yaml" , encoding = "utf-8" ) as yamlfile :
22- settings = yaml .safe_load (yamlfile )
23- return f"{ json .dumps (settings , indent = 4 )} \n "
22+ return yamlfile .read ()
2423
2524
2625def test_config () -> None :
You can’t perform that action at this time.
0 commit comments