Skip to content

Commit

Permalink
Merge pull request #628 from emmo-repo/flb/issue-627-emmocheck
Browse files Browse the repository at this point in the history
Check prefLabels in imported ontologies only if asked for.
  • Loading branch information
francescalb authored Jun 19, 2023
2 parents e6d6e08 + 116f7ad commit 3d5b2f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions emmopy/emmocheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,11 @@ def test_number_of_labels(self):
exceptions.update(
self.get_config("test_number_of_labels.exceptions", ())
)

if (
"prefLabel"
in self.onto.world._props # pylint: disable=protected-access
):
for entity in self.onto.get_entities():
for entity in self.onto.classes(self.check_imported):
if repr(entity) not in exceptions:
with self.subTest(
entity=entity,
Expand Down
4 changes: 2 additions & 2 deletions ontopy/manchester.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ def manchester_expression():
literal = (
typedLiteral | stringLanguageLiteral | stringLiteral | numberLiteral
)
logOp = pp.oneOf(["and", "or"], asKeyword=True)
logOp = pp.one_of(["and", "or"], asKeyword=True)
expr = pp.Forward()
restriction = pp.Forward()
primary = pp.Keyword("not")[...] + (
restriction | ident("cls") | pp.nestedExpr("(", ")", expr)
restriction | ident("cls") | pp.nested_expr("(", ")", expr)
)
objPropExpr = (
pp.Literal("inverse")
Expand Down

0 comments on commit 3d5b2f0

Please sign in to comment.