Skip to content

Commit

Permalink
trim trailing whitespace (#636)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbampton authored Jan 9, 2025
1 parent 0c99088 commit 84cc6bd
Show file tree
Hide file tree
Showing 29 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions build/attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def set_generate_name(self, generate_name):
idtok = generate_name.upper().replace(" ", "_").replace("-", "_").replace("/", "_").replace(".", "_").replace("__", "_")
self.id = "AST_LAYOUT_ATTRIBUTE_TYPE_" + idtok
return self

def set_is_required(self, value):
"""Set the is_required value"""
self.is_required = value
Expand All @@ -28,7 +28,7 @@ def add_text(self, language_code, text):
"""Set text for the main element."""
self.text.add_translation(language_code, text)
return self

def add_reserve_value(self, value):
"""Add a reserved value for the attribute."""
self.reserved_values.append(value)
Expand Down
4 changes: 2 additions & 2 deletions build/tags/a.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@
.add_text(Lang.EN, "rel") \
.add_text(Lang.FA, "رابطه") \
.add_reserve_values(rels.rels) \

element.add_attribute() \
.set_generate_name("target") \
.set_type(Type.String) \
.add_text(Lang.EN, "target") \
.add_text(Lang.FA, "هدف") \
.add_reserve_values(targets.targets) \

element.add_attribute() \
.set_generate_name("type") \
.set_type(Type.String) \
Expand Down
2 changes: 1 addition & 1 deletion build/tags/area.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
.add_text(Lang.EN, "target") \
.add_text(Lang.FA, "هدف") \
.add_reserve_values(targets.targets)

element.add_attribute() \
.set_generate_name("type") \
.set_type(Type.String) \
Expand Down
2 changes: 1 addition & 1 deletion build/tags/dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
element.set_generate_name("dialog")
element.set_text(Lang.EN, "dialog")
element.set_text(Lang.FA, "دیالوگ")

element.add_attribute() \
.set_generate_name("open") \
.set_type(Type.Boolean) \
Expand Down
2 changes: 1 addition & 1 deletion build/tags/fieldset.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
element.set_generate_name("fieldset")
element.set_text(Lang.EN, "fieldset")
element.set_text(Lang.FA, "فیلد ست")

element.add_attribute() \
.set_generate_name("disabled") \
.set_type(Type.Boolean) \
Expand Down
2 changes: 1 addition & 1 deletion build/tags/figcaption.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
element.set_generate_name("figcaption")
element.set_text(Lang.EN, "figcaption")
element.set_text(Lang.FA, "فیگ کپشن")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
Expand Down
2 changes: 1 addition & 1 deletion build/tags/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
element.set_generate_name("figure")
element.set_text(Lang.EN, "figure")
element.set_text(Lang.FA, "فیگور")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
Expand Down
2 changes: 1 addition & 1 deletion build/tags/footer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
element.set_generate_name("footer")
element.set_text(Lang.EN, "footer")
element.set_text(Lang.FA, "فوتر")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
Expand Down
2 changes: 1 addition & 1 deletion build/tags/form.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
element.set_generate_name("form")
element.set_text(Lang.EN, "form")
element.set_text(Lang.FA, "فرم")

element.add_attribute() \
.set_generate_name("accept-charset") \
.set_type(Type.Url) \
Expand Down
2 changes: 1 addition & 1 deletion build/tags/h1.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
element.set_generate_name("h1")
element.set_text(Lang.EN, "h1")
element.set_text(Lang.FA, "هدینگ 1")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
Expand Down
2 changes: 1 addition & 1 deletion build/tags/h2.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
element.set_generate_name("h2")
element.set_text(Lang.EN, "h2")
element.set_text(Lang.FA, "هدینگ 2")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
Expand Down
2 changes: 1 addition & 1 deletion build/tags/h3.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
element.set_generate_name("h3")
element.set_text(Lang.EN, "h3")
element.set_text(Lang.FA, "هدینگ 3")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
Expand Down
2 changes: 1 addition & 1 deletion build/tags/h4.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
element.set_generate_name("h4")
element.set_text(Lang.EN, "h4")
element.set_text(Lang.FA, "هدینگ 4")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
Expand Down
2 changes: 1 addition & 1 deletion build/tags/h5.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
element.set_generate_name("h5")
element.set_text(Lang.EN, "h5")
element.set_text(Lang.FA, "هدینگ 5")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
Expand Down
2 changes: 1 addition & 1 deletion build/tags/h6.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
element.set_generate_name("h6")
element.set_text(Lang.EN, "h6")
element.set_text(Lang.FA, "هدینگ 6")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
Expand Down
2 changes: 1 addition & 1 deletion build/tags/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
element.set_generate_name("header")
element.set_text(Lang.EN, "header")
element.set_text(Lang.FA, "هدر")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
Expand Down
2 changes: 1 addition & 1 deletion build/tags/hgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
element.set_generate_name("hgroup")
element.set_text(Lang.EN, "hgroup")
element.set_text(Lang.FA, "هدر گروه")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
Expand Down
2 changes: 1 addition & 1 deletion build/tags/hr.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
element.set_generate_name("hr")
element.set_text(Lang.EN, "hr")
element.set_text(Lang.FA, "خط")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
Expand Down
2 changes: 1 addition & 1 deletion build/tags/i.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
element.set_generate_name("i")
element.set_text(Lang.EN, "i")
element.set_text(Lang.FA, "ایتالیک")

element_dict = element.to_dict()

j = json.dumps(element_dict, indent=4, ensure_ascii=False)
Expand Down
2 changes: 1 addition & 1 deletion build/tags/iframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
.add_text(Lang.EN, "referrerpolicy") \
.add_text(Lang.FA, "ریفر پالیسی") \
.add_reserve_values(referrerpolicies.referrerpolicies) \

element.add_attribute() \
.set_generate_name("sandbox") \
.set_type(Type.AnyNoEmpty) \
Expand Down
4 changes: 2 additions & 2 deletions build/tags/img.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
Value().set_generate_name("eager").add_text(Lang.EN, "eager").add_text(Lang.FA, "مشتاق"),
Value().set_generate_name("lazy").add_text(Lang.EN, "lazy").add_text(Lang.FA, "لیزی"),
]) \

element.add_attribute() \
.set_generate_name("longdesc") \
.set_type(Type.Url) \
Expand All @@ -68,7 +68,7 @@
.add_text(Lang.EN, "referrerpolicy") \
.add_text(Lang.FA, "ریفر پالیسی") \
.add_reserve_values(referrerpolicies.referrerpolicies) \

element.add_attribute() \
.set_generate_name("sizes") \
.set_type(Type.Sizes) \
Expand Down
4 changes: 2 additions & 2 deletions build/tags/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
Value().set_generate_name("eager").add_text(Lang.EN, "eager").add_text(Lang.FA, "مشتاق"),
Value().set_generate_name("lazy").add_text(Lang.EN, "lazy").add_text(Lang.FA, "لیزی"),
]) \

element.add_attribute() \
.set_generate_name("longdesc") \
.set_type(Type.Url) \
Expand All @@ -68,7 +68,7 @@
.add_text(Lang.EN, "referrerpolicy") \
.add_text(Lang.FA, "ریفر پالیسی") \
.add_reserve_values(referrerpolicies.referrerpolicies) \

element.add_attribute() \
.set_generate_name("sizes") \
.set_type(Type.Sizes) \
Expand Down
2 changes: 1 addition & 1 deletion build/tags/td.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
.set_type(Type.ID) \
.add_text(Lang.EN, "headers") \
.add_text(Lang.FA, "هدر") \

element.add_attribute() \
.set_generate_name("rowspan") \
.set_type(Type.PositiveInt) \
Expand Down
4 changes: 2 additions & 2 deletions build/tags/textarea.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
.set_type(Type.Number) \
.add_text(Lang.EN, "cols") \
.add_text(Lang.FA, "کول") \

# TODO
element.add_attribute() \
.set_generate_name("dirname") \
.set_type(Type.AnyNoEmpty) \
.add_text(Lang.EN, "dirname") \
.add_text(Lang.FA, "نام جهت") \

element.add_attribute() \
.set_generate_name("disabled") \
.set_type(Type.Boolean) \
Expand Down
2 changes: 1 addition & 1 deletion build/tags/th.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
.set_type(Type.ID) \
.add_text(Lang.EN, "headers") \
.add_text(Lang.FA, "هدر") \

element.add_attribute() \
.set_generate_name("rowspan") \
.set_type(Type.PositiveInt) \
Expand Down
2 changes: 1 addition & 1 deletion build/tags/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
.add_reserve_values([
Value().set_generate_name("auto").add_text(Lang.EN, "auto").add_text(Lang.FA, "خودکار"),
Value().set_generate_name("metadata").add_text(Lang.EN, "metadata").add_text(Lang.FA, "متادیتا"),
Value().set_generate_name("none").add_text(Lang.EN, "none").add_text(Lang.FA, "هیچکدام"),
Value().set_generate_name("none").add_text(Lang.EN, "none").add_text(Lang.FA, "هیچکدام"),
]) \

element.add_attribute() \
Expand Down
2 changes: 1 addition & 1 deletion build/type.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Type:
Number = "AST_TYPE_NUMBER"
Boolean = "AST_TYPE_BOOLEAN"

# YYYY-MM-DDThh:mm:ssTZD
# YYYY-MM-DDThh:mm:ssTZD
Date = "AST_TYPE_DATE"
Time = "AST_TYPE_TIME"
DateTime = "AST_TYPE_DATETIME"
2 changes: 1 addition & 1 deletion build/value.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def set_all_text(self, text):
else:
raise ValueError("The text should be a string or a list of strings.")
return self

def validate(self):
"""Check if all languages have a value for the text."""
self.text.validate()
Expand Down
2 changes: 1 addition & 1 deletion config/admin/templates/edit.html.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@
row.remove();
}
}
function addLanguageInput(item_index, elm, lang) {
const table = elm.closest('table');
Expand Down

0 comments on commit 84cc6bd

Please sign in to comment.