Remove _kwmarker

python and starlark already have syntax for this.

Test: Presubmits
Change-Id: I9082c1cc62837840f091cd5856b1b4cc39064274
This commit is contained in:
Cole Faust 2023-11-09 12:40:38 -08:00
parent 092c6b68b8
commit b9b54396d4

View file

@ -80,23 +80,18 @@ _all_values_schema = {
},
}
def flag(name, partitions, default, _kwmarker = (), appends = False):
def flag(name, partitions, default, *, appends = False):
"""Declare a flag.
Args:
name: name of the flag
partitions: the partitions where this should be recorded.
default: the default value of the flag.
_kwmarker: Used to detect argument misuse.
appends: Whether new values should be append (not replace) the old.
Returns:
A dictionary containing the flag declaration.
"""
# If specified, appends must be a keyword value.
if _kwmarker != ():
fail("Too many positional parameters")
if not partitions:
fail("At least 1 partition is required")
if not name.startswith("RELEASE_"):