Skip to content

Commit

Permalink
Code readability
Browse files Browse the repository at this point in the history
  • Loading branch information
zyzzyxdonta committed Dec 19, 2024
1 parent a9291b6 commit c4de01c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/source/_ext/plugin_markup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,10 @@ def plugin_to_schema_org(plugin: Dict[str, Any]) -> SchemaOrgSoftwarePublication
name of the workflow step. If the plugin is marked as a Hermes ``builtin``, this is
expressed using ``schema:isPartOf``.
"""
keywords = [f"hermes-step-{step}" for step in plugin.get("steps", [])]

if "harvest" in plugin.get("steps", []) and (
harvested_files := plugin.get("harvested_files", [])
):
steps = plugin.get("steps", [])
keywords = [f"hermes-step-{step}" for step in steps]
if "harvest" in steps:
harvested_files = plugin.get("harvested_files", [])
keywords += [f"hermes-harvest-{keywordify(file)}" for file in harvested_files]

return SchemaOrgSoftwarePublication(
Expand Down

0 comments on commit c4de01c

Please sign in to comment.