build/argument_parser: Minor styles changes.

This commit is contained in:
Florent Kermarrec 2022-11-06 21:19:17 +01:00
parent 8040c83268
commit c62306d57e
1 changed files with 7 additions and 8 deletions

View File

@ -58,9 +58,9 @@ class LiteXArgumentParser(argparse.ArgumentParser):
self._target_group = self.add_argument_group(title="Target options")
if toolchains is not None:
self.add_target_argument("--toolchain",
default=self._default_toolchain,
choices=toolchains,
help="FPGA toolchain ({}).".format(" or ".join(toolchains)))
default = self._default_toolchain,
choices = toolchains,
help = "FPGA toolchain ({}).".format(" or ".join(toolchains)))
else:
self.add_target_argument("-toolchain", help="FPGA toolchain")
self.add_target_argument("--build", action="store_true", help="Build design.")
@ -147,8 +147,7 @@ class LiteXArgumentParser(argparse.ArgumentParser):
# Intercept selected toolchain to fill arguments.
if self._platform is not None:
self._toolchain = self.get_value_from_key("--toolchain",
self._default_toolchain)
self._toolchain = self.get_value_from_key("--toolchain", self._default_toolchain)
if self._toolchain is not None:
self._platform.fill_args(self._toolchain, self)