Skip to content

Commit d442278

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

File tree

11 files changed

+18
-31
lines changed

11 files changed

+18
-31
lines changed

script/release_data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
LABEL_DATA = sorted(obnb.data.annotated_ontology.__all__)
2929
DATA_RELEASE_VERSION = obnb.__data_version__
3030

31-
REPORT_TEMPLATE = r"""## Overview
31+
REPORT_TEMPLATE =\
32+
r"""## Overview
3233
3334
- Release version: {{ version }}
3435
- Release date: {{ time }}

src/obnb/exception.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
11
class DataNotFoundError(Exception):
22
"""Raised when an particular version of arvhival data is unavailable."""
33

4-
54
class ExceededMaxNumRetries(Exception):
65
"""Raised when the number of download retries exceeds the limit."""
76

8-
97
class IDNotExistError(Exception):
108
"""Raised when query ID not exist."""
119

12-
1310
class IDExistsError(Exception):
1411
"""Raised when try to add new ID that already exists."""
15-
16-
1712
class EdgeNotExistError(Exception):
1813
"""Raised when the edge being accessed does not exist."""
19-
20-
2114
class NotConvergedWarning(RuntimeWarning):
2215
"""Warn when model not converged."""
2316

24-
2517
class OboTermIncompleteError(Exception):
2618
"""Raised when the obo term do not have an ID or a name."""
19+

src/obnb/ext/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
"""Extension modules to interface with obnb."""
2+

src/obnb/label/filters/range_filter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ def get_val_getter(self, lsc):
161161
162162
"""
163163

164+
164165
def val_getter(label_id):
165166
y_all, masks = lsc.split(self.splitter, **self.kwargs)
166167
neg_idx = lsc.entity[lsc.get_negative(label_id)]

src/obnb/model/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
"""Collection of network based prediction models."""
2+

src/obnb/transform/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
"""Transformation module."""
2+

src/obnb/util/deprecated.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def __init__(
2323
def __call__(self, func):
2424
"""Wraps the function with deprecation warning."""
2525

26+
2627
@wraps(func)
2728
def wrapped(*args, **kwargs):
2829
warnings.simplefilter("always", self.category)

src/obnb/util/parallel.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def __init__(
8181
def __call__(self, func):
8282
"""Return the parallelized function over the input arguments."""
8383

84+
8485
def wrapper(*func_args, **func_kwargs):
8586
n_workers = self.n_workers
8687
n_jobs = self.n_jobs
@@ -236,6 +237,7 @@ class ParDatMap(ParDat):
236237
def __call__(self, func):
237238
"""Return the parallelized function over the input arguments."""
238239

240+
239241
def wrapper(*func_args, **func_kwargs):
240242
n_workers = self.n_workers
241243
n_jobs = self.n_jobs
@@ -283,6 +285,7 @@ class ParDatExe(ParDat):
283285
def __call__(self, func):
284286
"""Return the parallelized function over the input arguments."""
285287

288+
286289
def wrapper(*func_args, **func_kwargs):
287290
n_workers = self.n_workers
288291
n_jobs = self.n_jobs

src/obnb/util/timer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def __init__(self, verbose: bool = True) -> None:
1919
def __call__(self, func):
2020
"""Return function wrapped with timer."""
2121

22+
2223
def wrapper(*args):
2324
start = time.perf_counter()
2425
func(*args)

test/test_graph.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,21 +1079,11 @@ def test_ancestors(self):
10791079
self.assertEqual(graph.ancestors("f"), {"a", "c", "d"})
10801080

10811081
def test_restrict_to_branch(self):
1082-
r"""
1083-
1084-
a
1085-
| \
1086-
b d
1087-
| | \
1088-
c e [z] f [x, y]
1089-
1090-
|
1091-
V
1082+
r"""A | \ b d | | \ c e [z] f [x, y]
10921083
1093-
d
1094-
| \
1095-
e [z] f [x, y]
1084+
| V
10961085
1086+
d | \ e [z] f [x, y]
10971087
10981088
"""
10991089
graph = OntologyGraph()

0 commit comments

Comments
 (0)