Skip to content

Commit a1d2dd8

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ca531ce commit a1d2dd8

29 files changed

+92
-54
lines changed

examples/sessions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
}}
133133
"""
134134
)(citizen=OntologyIndividual, age=int)
135-
for (citizen, age) in result:
135+
for citizen, age in result:
136136
print(citizen.name, age)
137137

138138
# Session contents can be exported to RDF,

examples/terminological_knowledge.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,11 @@
115115
print(" - restriction type", restriction.rtype)
116116
print(
117117
" - affected predicate",
118-
restriction.attribute
119-
if restriction.rtype == RESTRICTION_TYPE.ATTRIBUTE_RESTRICTION
120-
else restriction.relationship,
118+
(
119+
restriction.attribute
120+
if restriction.rtype == RESTRICTION_TYPE.ATTRIBUTE_RESTRICTION
121+
else restriction.relationship
122+
),
121123
)
122124
print("\n`Integer` ontology class object from the `emmo` namespace")
123125
composition = tuple(

simphony_osp/interfaces/dataspace/interface.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""The data space store connects SimPhoNy to a data space."""
2+
23
import os
34
import pathlib
45
from base64 import b64encode

simphony_osp/interfaces/interface.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Universal interface for wrapper developers."""
2+
23
from __future__ import annotations
34

45
import logging
@@ -974,12 +975,15 @@ def __call__(self, subject: Node):
974975
if s not in added_subjects and s in tracker.existing_subjects:
975976
deleted_subjects[s] = deleted_subjects.get(s, 0) + 1
976977
deleted_subjects = {
977-
s: True
978-
if count
979-
>= sum(
980-
1 for _ in self.interface.old_graph.triples((s, None, None))
978+
s: (
979+
True
980+
if count
981+
>= sum(
982+
1
983+
for _ in self.interface.old_graph.triples((s, None, None))
984+
)
985+
else False
981986
)
982-
else False
983987
for s, count in deleted_subjects.items()
984988
}
985989
deleted_subjects = {

simphony_osp/interfaces/remote/server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ def __init__(
3535
)
3636
self._interfaces: Dict[UUID, Interface] = dict()
3737
self._directories: Dict[UUID, tempfile.TemporaryDirectory] = dict()
38-
self._interface_generator: Callable[
39-
[str, str], Interface
40-
] = generate_interface
38+
self._interface_generator: Callable[[str, str], Interface] = (
39+
generate_interface
40+
)
4141

4242
def listen(self) -> None:
4343
"""Listen for connections from clients."""

simphony_osp/namespaces.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""You can import the installed namespaces from this module."""
2+
23
from __future__ import annotations
34

45
import logging as _logging

simphony_osp/ontology/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
QUANTIFIER as RESTRICTION_QUANTIFIER,
2121
)
2222
from simphony_osp.ontology.restriction import RTYPE as RESTRICTION_TYPE
23-
from simphony_osp.ontology.restriction import Restriction
23+
from simphony_osp.ontology.restriction import (
24+
Restriction,
25+
)
2426

2527
__all__ = [
2628
"AnnotationSet",

simphony_osp/ontology/annotation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""An annotation property defined in the ontology."""
2+
23
from __future__ import annotations
34

45
import logging

simphony_osp/ontology/attribute.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""An attribute defined in the ontology."""
2+
23
from __future__ import annotations
34

45
import logging

simphony_osp/ontology/composition.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This files defines composition of classes."""
2+
23
from __future__ import annotations
34

45
import logging

0 commit comments

Comments
 (0)