Skip to content

Commit

Permalink
fix pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
Treesarj committed Aug 28, 2024
1 parent 10cf1ba commit 3139d0a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions oteapi_dlite/strategies/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,22 +242,17 @@ class URIs within a specified RDF graph.
{% macro sparql_query(class_names, graph_uri) %}
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT ?parentClass
WHERE {
GRAPH <{{ graph_uri }}> {
# Subclass traversal to find parent classes
?class rdfs:subClassOf* ?parentClass .
FILTER(
{% for class_name in class_names -%}
?class = <{{ class_name }}>{{ " ||" if not loop.last }}
{% endfor %}
)
{% endfor %})
}
}
{% endmacro %}
"""

template = Template(template_str)
Expand Down

0 comments on commit 3139d0a

Please sign in to comment.