Skip to content

Commit

Permalink
Updated with type hints in get_entities
Browse files Browse the repository at this point in the history
  • Loading branch information
francescalb committed Dec 16, 2024
1 parent dd278a8 commit 401f1d7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ontopy/ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
)

if TYPE_CHECKING:
from typing import Iterator, List, Sequence
from typing import Iterator, List, Sequence, Generator

Check warning on line 55 in ontopy/ontology.py

View check run for this annotation

Codecov / codecov/patch

ontopy/ontology.py#L55

Added line #L55 was not covered by tests


# Default annotations to look up
Expand Down Expand Up @@ -1136,14 +1136,14 @@ def rec_imported(onto, imported):
def get_entities( # pylint: disable=too-many-arguments
self,
*,
imported=True,
classes=True,
individuals=True,
object_properties=True,
data_properties=True,
annotation_properties=True,
properties=True,
):
imported: bool = True,
classes: bool = True,
individuals: bool = True,
object_properties: bool = True,
data_properties: bool = True,
annotation_properties: bool = True,
properties: bool = True,
) -> "Generator[Union[str, object], None, None]":
"""
This method returns a generator over entities in the ontology,
including the following categories:
Expand Down

0 comments on commit 401f1d7

Please sign in to comment.