Fix incomplete pre-flight comments in generated example.

Related to #40
This commit is contained in:
Salvador E. Tropea 2021-01-05 13:34:08 -03:00
parent 9a1e1f39e7
commit 6eba98d27f
2 changed files with 10 additions and 8 deletions

View File

@ -2,22 +2,22 @@ kibot:
version: 1
preflight:
# [boolean=false] Zones are filled before doing any operation involving PCB layers
# [boolean=false] Zones are filled before doing any operation involving PCB layers.
check_zone_fills: true
# [list(dict)] A list of entries to filter out ERC/DRC messages
# [list(dict)] A list of entries to filter out ERC/DRC messages.
filters:
- filter: 'Filter description'
error: '10'
regex: 'Regular expression to match'
# [boolean=false] Option for `run_drc`. Ignores the unconnected nets. Useful if you didn't finish the routing
# [boolean=false] Option for `run_drc`. Ignores the unconnected nets. Useful if you didn't finish the routing.
ignore_unconnected: false
# [boolean=false] Runs the DRC (Distance Rules Check). To ensure we have a valid PCB
# [boolean=false] Runs the DRC (Distance Rules Check). To ensure we have a valid PCB.
run_drc: true
# [boolean=false] Runs the ERC (Electrical Rules Check). To ensure the schematic is electrically correct
# [boolean=false] Runs the ERC (Electrical Rules Check). To ensure the schematic is electrically correct.
run_erc: true
# [boolean=false] Update the XML version of the BoM (Bill of Materials).
To ensure our generated BoM is up to date.
Note that this isn't needed when using the internal BoM generator (`bom`)
# To ensure our generated BoM is up to date.
# Note that this isn't needed when using the internal BoM generator (`bom`).
update_xml: true
outputs:

View File

@ -391,7 +391,9 @@ def create_example(pcb_file, out_dir, copy_options, copy_expand):
pres = BasePreFlight.get_registered()
for n, o in OrderedDict(sorted(pres.items())).items():
if o.__doc__:
f.write(' #'+o.__doc__.rstrip()+'\n')
lines = trim(o.__doc__.rstrip()+'.')
for ln in lines:
f.write(' # '+ln.rstrip()+'\n')
f.write(' {}: {}\n'.format(n, o.get_example()))
# Outputs
outs = RegOutput.get_registered()