Fixed example to use null instead of None

- YAML's null is the equivalent of Python None
- Related to #116
This commit is contained in:
Salvador E. Tropea 2021-12-01 16:25:55 -03:00
parent 1e6ac697f0
commit 094e58eab6
2 changed files with 6 additions and 4 deletions

View File

@ -329,13 +329,13 @@ outputs:
# [boolean=false] Invert the Y axis
mirror_y_axis: false
# [string] Force this replacement for %i when generating NPTH files
npth_id: None
npth_id: null
# [string='%f-%i%v.%x'] name for the drill file, KiCad defaults if empty (%i='PTH_drill'). Affected by global options
output: '%f-%i%v.%x'
# [boolean=true] Generate one file for both, plated holes and non-plated holes, instead of two separated files
pth_and_npth_single_file: true
# [string] Force this replacement for %i when generating PTH and unified files
pth_id: None
pth_id: null
# [dict|string] Name of the drill report. Not generated unless a name is specified
report:
# [string=''] Name of the drill report. Not generated unless a name is specified.
@ -365,11 +365,11 @@ outputs:
# [string='pdf'] [hpgl,ps,gerber,dxf,svg,pdf] Format for a graphical drill map
type: 'pdf'
# [string] Force this replacement for %i when generating NPTH files
npth_id: None
npth_id: null
# [string='%f-%i%v.%x'] name for the drill file, KiCad defaults if empty (%i='PTH_drill'). Affected by global options
output: '%f-%i%v.%x'
# [string] Force this replacement for %i when generating PTH and unified files
pth_id: None
pth_id: null
# [dict|string] Name of the drill report. Not generated unless a name is specified
report:
# [string=''] Name of the drill report. Not generated unless a name is specified.

View File

@ -544,6 +544,8 @@ def print_example_options(f, cls, name, indent, po, is_list=False):
else:
if is_list and first:
k = '- '+k
if val is None:
val = 'null'
f.write(ind_str+'{}: {}\n'.format(k, val))
if is_list and first:
ind_str += ' '