From 4e30719814b6e26b4649d1c1bef595b428cef189 Mon Sep 17 00:00:00 2001 From: Alkid Date: Mon, 9 Sep 2024 16:12:46 +0200 Subject: [PATCH] Fixed circular imports --- owlapy/abstracts/abstract_owl_ontology.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/owlapy/abstracts/abstract_owl_ontology.py b/owlapy/abstracts/abstract_owl_ontology.py index c24f917..2b8b517 100644 --- a/owlapy/abstracts/abstract_owl_ontology.py +++ b/owlapy/abstracts/abstract_owl_ontology.py @@ -1,5 +1,5 @@ from abc import ABCMeta, abstractmethod -from typing import Final, Iterable, Union, Optional +from typing import Final, Iterable, Union, Optional, TypeVar from owlapy.class_expression import OWLClass from owlapy.iri import IRI @@ -7,9 +7,11 @@ OWLDataPropertyRangeAxiom, OWLObjectPropertyDomainAxiom, OWLObjectPropertyRangeAxiom, OWLAxiom from owlapy.owl_individual import OWLNamedIndividual from owlapy.owl_object import OWLObject -from owlapy.owl_ontology import _M, OWLOntologyID from owlapy.owl_property import OWLDataProperty, OWLObjectProperty +_M = TypeVar('_M', bound='OWLOntologyManager') # noqa: F821 +_OI = TypeVar('_OI', bound='OWLOntologyID') # noqa: F821 + class OWLOntology(OWLObject, metaclass=ABCMeta): """Represents an OWL 2 Ontology in the OWL 2 specification. @@ -136,7 +138,7 @@ def get_owl_ontology_manager(self) -> _M: pass @abstractmethod - def get_ontology_id(self) -> OWLOntologyID: + def get_ontology_id(self) -> _OI: """Gets the OWLOntologyID belonging to this object. Returns: