Closed marekvi95 closed 2 years ago
Could you give me an example of a command with an option using \b
(for test purposes)?
We use this option with \b to prevent rewrapping
_lpcusbsio_option = click.option(
"-l",
"--lpcusbsio",
metavar="[usb,VID:PID|USB_PATH|SER_NUM,]spi|i2c",
help="""USB-SIO bridge interface.
Optional USB device filtering formats:
[usb,vid:pid|usb_path|serial_number]
Following serial interfaces are supported:
\b
spi[index][,port,pin,speed_kHz,polarity,phase]
- index ... optional index of SPI peripheral. Example: "spi1" (default=0)
- port ... bridge GPIO port used as SPI SSEL(default=0)
- pin ... bridge GPIO pin used as SPI SSEL
default SSEL is set to 0.15 which works
for the LPCLink2 bridge. The MCULink OB
bridge ignores the SSEL value anyway.(default=15)
- speed_kHz ... SPI clock in kHz (default 1000)
- polarity ... SPI CPOL option (default=1)
- phase ... SPI CPHA option (default=1)
\b
i2c[index][,address,speed_kHz]
- index ... optional index of I2C peripheral. Example: "i2c1" (default=0)
- address ... I2C device address (default 0x10)
- speed_kHz ... I2C clock in kHz (default 100)
""",
)
We use \b to prevent rewrapping also in click options. There's a workaround in sphinx-click to append '|' when there's a line containing \b, but this workaround is missing for click.options and we receive warnings during sphinx build because of bad indentation. Please could you extend this also for click options?
Click 8.1.2 sphinx-click 4.1.0 Python 3.9.5