mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-26 16:30:07 +08:00
[supervision] Adds documentation tab. (#2972)
* [supervision] Adds documentation tab. * [generator] add a target option to dump modules by target with load type * [supervision] doc: handle modules type. * [supervision] modules doc: add filter. * [supervision] Use internet doc by default. * [supervision] Move the header out of the configuration tab. * [supervision] Add target label. * [supervision] Gracefully handle Ctrl-C. * [supervision] Add new session to combobox. * Update sw/supervision/python/doc_panel.py --------- Co-authored-by: Gautier Hattenberger <gautier.hattenberger@enac.fr>
This commit is contained in:
@@ -18,12 +18,20 @@ PAPARAZZI_HOME = os.getenv("PAPARAZZI_HOME", PAPARAZZI_SRC)
|
||||
CONF_DIR = os.path.join(PAPARAZZI_HOME, "conf/")
|
||||
|
||||
|
||||
def removeprefix(string: str, prefix: str, /) -> str:
|
||||
def remove_prefix(string: str, prefix: str, /) -> str:
|
||||
if string.startswith(prefix):
|
||||
return string[len(prefix):]
|
||||
else:
|
||||
return string[:]
|
||||
|
||||
|
||||
def remove_suffix(s: str, suffix: str, /) -> str:
|
||||
if s.endswith(suffix):
|
||||
return s[:-len(suffix)]
|
||||
else:
|
||||
return s
|
||||
|
||||
|
||||
# TODO: make it work with shell program such as vim.
|
||||
def edit_file(file_path, prefix=CONF_DIR):
|
||||
path = prefix + file_path
|
||||
|
||||
Reference in New Issue
Block a user