mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
rtems-bsps: Run through yapf
I disabled yapf for the long list that was easier to read in its current form the rest are trivial changes. We want this as eventually we'll be doing yapf for CI.
This commit is contained in:
committed by
Kinsey Moore
parent
f18fc04657
commit
a0ab18ed0d
19
rtems-bsps
19
rtems-bsps
@@ -37,7 +37,6 @@ import sys
|
||||
|
||||
rtems_version = 7
|
||||
|
||||
|
||||
_BUILD_TYPE_BSP = re.compile(r"build-type:\s*bsp\n")
|
||||
_ARCH = re.compile(r"arch:\s*(\S+)\n")
|
||||
_FAMILY = re.compile(r"family:\s*(\S+)\n")
|
||||
@@ -47,6 +46,7 @@ _BSP = re.compile(r"bsp:\s*(\S+)\n")
|
||||
class ArchBsps:
|
||||
"""Collects and processes the BSPs for a range of architectures
|
||||
creating output in text, markdown and HTML ir pandoc is installed"""
|
||||
|
||||
def __init__(self, path='.', trace=False):
|
||||
self.trace = trace
|
||||
self._output = []
|
||||
@@ -292,7 +292,8 @@ class ArchBsps:
|
||||
p = os.path.join('bsps',
|
||||
self.archs[arch][family][bsp])
|
||||
pair = arch + '/' + bsp
|
||||
pair = '%-*s %s' % (max_arch + max_bsp + 1, pair, p)
|
||||
pair = '%-*s %s' % (max_arch + max_bsp + 1,
|
||||
pair, p)
|
||||
|
||||
self._out(pair)
|
||||
else:
|
||||
@@ -301,6 +302,7 @@ class ArchBsps:
|
||||
def config(self, arch_selector=None, family_selector=None):
|
||||
"""Generate output as pairs"""
|
||||
self._clear()
|
||||
# yapf: disable
|
||||
self._out(['# Generated by rtems-bsp',
|
||||
'[DEFAULT]',
|
||||
'# Build',
|
||||
@@ -338,6 +340,7 @@ class ArchBsps:
|
||||
'BSP_VERBOSE_FATAL_EXTENSION = 1',
|
||||
'BSP_PRINT_EXCEPTION_CONTEXT = 1',
|
||||
'BSP_RESET_BOARD_AT_EXIT = 1'])
|
||||
# yapf: enable
|
||||
self._out()
|
||||
max_arch = self._max_arch_len()
|
||||
max_bsp = self._max_bsp_len()
|
||||
@@ -393,10 +396,11 @@ def run(args):
|
||||
'--pairs',
|
||||
help='Output architectures and BSPs in CPU/BSP format',
|
||||
action='store_true')
|
||||
argsp.add_argument('-C',
|
||||
'--config',
|
||||
help='Output architectures and BSPs in `config.ini` format',
|
||||
action='store_true')
|
||||
argsp.add_argument(
|
||||
'-C',
|
||||
'--config',
|
||||
help='Output architectures and BSPs in `config.ini` format',
|
||||
action='store_true')
|
||||
|
||||
argopts = argsp.parse_args(args[1:])
|
||||
|
||||
@@ -416,8 +420,7 @@ def run(args):
|
||||
family_selector=argopts.family,
|
||||
show_path=argopts.paths)
|
||||
elif argopts.config:
|
||||
ab.config(arch_selector=argopts.arch,
|
||||
family_selector=argopts.family)
|
||||
ab.config(arch_selector=argopts.arch, family_selector=argopts.family)
|
||||
else:
|
||||
ab.text(arch_selector=argopts.arch,
|
||||
family_selector=argopts.family,
|
||||
|
||||
Reference in New Issue
Block a user