3636import logging
3737import os
3838import sys
39- import typing
4039import warnings
40+ from typing import Dict , Set , Tuple , Union
4141
4242import pyshacl # type: ignore
4343import rdflib
@@ -182,7 +182,7 @@ def main() -> None:
182182 ontology_graph .parse (arg_ontology_graph )
183183
184184 # Construct set of CDO concepts for data graph concept-existence review.
185- cdo_concepts : typing . Set [rdflib .URIRef ] = set ()
185+ cdo_concepts : Set [rdflib .URIRef ] = set ()
186186
187187 for n_structural_class in [
188188 NS_OWL .Class ,
@@ -230,7 +230,7 @@ def main() -> None:
230230 continue
231231 cdo_concepts .add (rdflib .URIRef (cleaned_line ))
232232
233- data_cdo_concepts : typing . Set [rdflib .URIRef ] = set ()
233+ data_cdo_concepts : Set [rdflib .URIRef ] = set ()
234234 for data_triple in data_graph .triples ((None , None , None )):
235235 for data_triple_member in data_triple :
236236 if isinstance (data_triple_member , rdflib .URIRef ):
@@ -255,13 +255,11 @@ def main() -> None:
255255 # determination by output file extension. case_validate will defer
256256 # to pySHACL behavior, as other CASE tools don't (at the time of
257257 # this writing) have the value "human" as an output format.
258- validator_kwargs : typing . Dict [str , str ] = dict ()
258+ validator_kwargs : Dict [str , str ] = dict ()
259259 if args .format != "human" :
260260 validator_kwargs ["serialize_report_graph" ] = args .format
261261
262- validate_result : typing .Tuple [
263- bool , typing .Union [Exception , bytes , str , rdflib .Graph ], str
264- ]
262+ validate_result : Tuple [bool , Union [Exception , bytes , str , rdflib .Graph ], str ]
265263 validate_result = pyshacl .validate (
266264 data_graph ,
267265 shacl_graph = ontology_graph ,
0 commit comments