Skip to content

Commit

Permalink
Fixed linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alkidbaci committed Feb 13, 2025
1 parent eb7bebc commit 023ee00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions owlapy/owl_ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,7 @@ def __init__(self, path: Union[IRI, str], load: bool = True):
self.owlapi_ontology = self.owlapi_manager.createOntology(Stream.empty(),
owlapi_IRI.create(path))
except Exception as e:
print(f"Error: {e}")
raise NotImplementedError("Cant initialize a new ontology using path. Use IRI instead")
else: # means we are loading an existing ontology
self.owlapi_ontology = self.owlapi_manager.loadOntologyFromOntologyDocument(File(file_path))
Expand Down
5 changes: 1 addition & 4 deletions owlapy/owl_reasoner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1033,10 +1033,7 @@ def __init__(self, ontology: Union[SyncOntology, str], reasoner="HermiT"):
(f"'{reasoner}' is not implemented. Available reasoners: ['HermiT', 'Pellet', 'JFact', 'Openllet', "
f"'Structural']. "
f"This field is case sensitive.")
if not jpype.isJVMStarted():
startJVM()
# noinspection PyUnresolvedReferences
from org.semanticweb.owlapi.apibinding import OWLManager

if isinstance(ontology, SyncOntology):
self.ontology = ontology
elif isinstance(ontology, str):
Expand Down

0 comments on commit 023ee00

Please sign in to comment.