Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions bin/amphtml-update.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,10 +787,10 @@ def GetMandatoryOf( attr, constraint ):
Returns:
A list of attributes that have that constraint name.
"""
attributes = []
attributes = set()
for attr_spec in attr:
if attr_spec.HasField(constraint):
attributes.append(
attributes.add(
# Convert something like [src] to data-amp-bind-src.
re.sub(
"^\[(\S+)\]$",
Expand All @@ -799,8 +799,7 @@ def GetMandatoryOf( attr, constraint ):
)
)

attributes.sort()
return attributes
return sorted(attributes)

def Phpize(data, indent=0):
"""Helper function to convert JSON-serializable data into PHP literals.
Expand Down
Loading