Skip to content

Commit

Permalink
Update dependencies, run black, fix a test
Browse files Browse the repository at this point in the history
  • Loading branch information
dblanchette committed Dec 18, 2023
1 parent 0ac5c25 commit 27bc04e
Show file tree
Hide file tree
Showing 3 changed files with 326 additions and 336 deletions.
15 changes: 9 additions & 6 deletions json_schema_for_humans/md_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,28 +328,31 @@ def properties_table(self, schema: SchemaNode) -> List[List]:
if field == "Property":
# property name
property_name = "+ " if sub_property.is_required_property else "- "
property_name += self.format_link(escape_for_table(sub_property.property_name), sub_property.html_id)
property_name += self.format_link(
escape_for_table(sub_property.property_name), sub_property.html_id
)
line.append(property_name)
elif field == "Pattern":
# pattern
line.append("Yes" if sub_property.is_pattern_property else "No")
elif field == "Type":
# type
line.append(
"Combination" if jinja_filters.is_combining(sub_property) else escape_for_table(sub_property.type_name)
"Combination"
if jinja_filters.is_combining(sub_property)
else escape_for_table(sub_property.type_name)
)
elif field == "Deprecated":
# Deprecated
line.append(
self.badge("Deprecated", "red") \
if jinja_filters.deprecated(self.config, sub_property) \
else "No"
self.badge("Deprecated", "red") if jinja_filters.deprecated(self.config, sub_property) else "No"
)
elif field == "Definition":
# Link
if sub_property.should_be_a_link(self.config):
line.append(
"Same as " + self.format_link(sub_property.links_to.link_name, sub_property.links_to.html_id)
"Same as "
+ self.format_link(sub_property.links_to.link_name, sub_property.links_to.html_id)
)
elif sub_property.refers_to:
line.append("In " + sub_property.ref_path)
Expand Down
Loading

0 comments on commit 27bc04e

Please sign in to comment.