Skip to content

Commit 0df86e0

Browse files
committed
Avoid overwriting ResultParser plugins
1 parent c173f51 commit 0df86e0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

rdflib/plugin.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,9 +592,13 @@ def plugins(
592592
"rdflib.plugins.sparql.results.tsvresults",
593593
"TSVResultParser",
594594
)
595-
for parser in list(plugins(kind=Parser)):
595+
596+
graph_parsers = {parser.name for parser in plugins(kind=Parser)}
597+
result_parsers = {parser.name for parser in plugins(kind=ResultParser)}
598+
graph_result_parsers = graph_parsers - result_parsers
599+
for parser_name in graph_result_parsers:
596600
register(
597-
parser.name,
601+
parser_name,
598602
ResultParser,
599603
"rdflib.plugins.sparql.results.graph",
600604
"GraphResultParser",

0 commit comments

Comments
 (0)