Modify required attributes to not need to appear before optional.

This will enable the creation of test spec types for each test type that
accurately indicate required fields. For example ScriptTest requires
that the script value be provided. This wouldn't be possible to declare
using the standard behavior no default behavior because it would appear
on a spec type that inherits from the base spec type which will have
optional attributes. That would require a workaround of accepting a None
default and customizing the create method to require the parameter.

Bug: 1128746
Change-Id: I41ce870d695a83451312db60ff68183e1e233e48
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/build/+/2518000
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: Stephen Martinis <martiniss@chromium.org>
2 files changed
tree: 064c2f30bc2c927a46c3cc76c4b9eb10615ad09b
  1. infra/
  2. recipes/
  3. scripts/
  4. site_config/
  5. third_party/
  6. .gitattributes
  7. .gitignore
  8. .style.yapf
  9. .vpython
  10. .yapfignore
  11. codereview.settings
  12. CROS_OWNERS
  13. DEPS
  14. environment.cfg.py
  15. LICENSE
  16. OWNERS
  17. PRESUBMIT.py
  18. README.md
  19. WATCHLISTS
README.md

Recipes

If you're here to make a change to ‘recipes’ (the code located in scripts/slave/recipes*), please take a look at the README for more information pertaining to recipes.

Style

The preferred style is PEP8 with two-space indent; that is, the Chromium Python style. Functions use lowercase_with_underscores, with the exception of the special functions RunSteps and RunTests in recipes. Use yapf (git cl format --no-clang-format) to autoformat new code.