Skip to content

Commit 26d2d1d

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

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

adaptive/learner/average_learner1D.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ def __init__(
7979
self,
8080
function: Callable[[tuple[int, Real]], Real],
8181
bounds: tuple[Real, Real],
82-
loss_per_interval: None
83-
| (Callable[[Sequence[Real], Sequence[Real]], float]) = None,
82+
loss_per_interval: None | (
83+
Callable[[Sequence[Real], Sequence[Real]], float]
84+
) = None,
8485
delta: float = 0.2,
8586
alpha: float = 0.005,
8687
neighbor_sampling: float = 0.3,

adaptive/learner/integrator_learner.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ class DivergentIntegralError(ValueError):
7171

7272

7373
class _Interval:
74-
7574
"""
7675
Attributes
7776
----------

adaptive/learner/learner1D.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -633,10 +633,12 @@ def tell_pending(self, x: float) -> None:
633633
def tell_many(
634634
self,
635635
xs: Sequence[Float] | np.ndarray,
636-
ys: Sequence[Float]
637-
| Sequence[Sequence[Float]]
638-
| Sequence[np.ndarray]
639-
| np.ndarray,
636+
ys: (
637+
Sequence[Float]
638+
| Sequence[Sequence[Float]]
639+
| Sequence[np.ndarray]
640+
| np.ndarray
641+
),
640642
*,
641643
force: bool = False,
642644
) -> None:

adaptive/learner/learnerND.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -987,9 +987,11 @@ def plot_slice(self, cut_mapping, n=None):
987987
xs = ys = np.linspace(0, 1, n)
988988
xys = [xs[:, None], ys[None, :]]
989989
values = [
990-
cut_mapping[i]
991-
if i in cut_mapping
992-
else xys.pop(0) * (b[1] - b[0]) + b[0]
990+
(
991+
cut_mapping[i]
992+
if i in cut_mapping
993+
else xys.pop(0) * (b[1] - b[0]) + b[0]
994+
)
993995
for i, b in enumerate(self._bbox)
994996
]
995997

adaptive/runner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ def __init__(
470470
npoints_goal: int | None = None,
471471
end_time_goal: datetime | None = None,
472472
duration_goal: timedelta | int | float | None = None,
473-
executor: (ExecutorTypes | None) = None,
473+
executor: ExecutorTypes | None = None,
474474
ntasks: int | None = None,
475475
log: bool = False,
476476
shutdown_executor: bool = False,
@@ -629,7 +629,7 @@ def __init__(
629629
npoints_goal: int | None = None,
630630
end_time_goal: datetime | None = None,
631631
duration_goal: timedelta | int | float | None = None,
632-
executor: (ExecutorTypes | None) = None,
632+
executor: ExecutorTypes | None = None,
633633
ntasks: int | None = None,
634634
log: bool = False,
635635
shutdown_executor: bool = False,
@@ -956,7 +956,7 @@ def _ensure_executor(executor: ExecutorTypes | None) -> concurrent.Executor:
956956

957957

958958
def _get_ncores(
959-
ex: (ExecutorTypes),
959+
ex: ExecutorTypes,
960960
) -> int:
961961
"""Return the maximum number of cores that an executor can use."""
962962
if with_ipyparallel:

0 commit comments

Comments
 (0)